![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
Hi Using FM 8.5 Pro Adv on Windows XP I have a text field 'con_use', which I have placed on a layout as a checkbox. I have set up a value list with just one line 'Use In Correspondence', which I have set up to display in this checkbox on my layout. Obviously (I suppose its obvious!), the field in question, set up as it is on my layout, should equal one of two values, either 'Use In Correspondence' or an empty value. So far so good. Now I have noticed that it is possible to drag and drop values from fields to fields including checkboxes. I know it is possible to turn this option off, but it seems a useful option to keep enabled. As I say it is possible to drop a value into a checkbox, which in the case of 'con_use' would most likely result in the field containing an invalid value. |
|
My first thought was perhaps I entered the calculation in the calculation box incorrectly. Should it read con_use = "Use In Correspondence" or con_use = "" |
|
Should it read con_use = "Use In Correspondence" or con_use = "" |
#3
| |||
| |||
|
|
On Apr 7, 4:27 am, "Jeff Wright" <j... (AT) jeffwright (DOT) demon.co.uk> wrote: Hi Using FM 8.5 Pro Adv on Windows XP I have a text field 'con_use', which I have placed on a layout as a checkbox. I have set up a value list with just one line 'Use In Correspondence', which I have set up to display in this checkbox on my layout. Obviously (I suppose its obvious!), the field in question, set up as it is on my layout, should equal one of two values, either 'Use In Correspondence' or an empty value. So far so good. Now I have noticed that it is possible to drag and drop values from fields to fields including checkboxes. I know it is possible to turn this option off, but it seems a useful option to keep enabled. As I say it is possible to drop a value into a checkbox, which in the case of 'con_use' would most likely result in the field containing an invalid value. My first thought was perhaps I entered the calculation in the calculation box incorrectly. Should it read con_use = "Use In Correspondence" or con_use = "" This is an interesting 'feature' of checkboxes and radio buttons I never noticed. This is the kind of thing can keep me up at night, wondering how many little holes are in my solutions. Should it read con_use = "Use In Correspondence" or con_use = "" Yes, that would work. You need to include the field name itself in your test. I prefer: Case( IsEmpty(con_use); 1; con_use = "Use In Correspondence"; 1; 0) Problem is users won't understand what they've done wrong. As far as they can see the field is empty but they're getting an error message. They'll have to check and uncheck on the field to straighten the values out. And a checkbox won't work here, it has to be a radio button. You might want to consider an auto-enter calculation always replace instead. Put the above Case statement in and replace the 1s with con_use and the 0 with "". G |
#4
| |||
| |||
|
|
Hi Using FM 8.5 Pro Adv on Windows XP I have a text field 'con_use', which I have placed on a layout as a checkbox. I have set up a value list with just one line 'Use In Correspondence', which I have set up to display in this checkbox on my layout. Obviously (I suppose its obvious!), the field in question, set up as it is on my layout, should equal one of two values, either 'Use In Correspondence' or an empty value. So far so good. Now I have noticed that it is possible to drag and drop values from fields to fields including checkboxes. I know it is possible to turn this option off, but it seems a useful option to keep enabled. As I say it is possible to drop a value into a checkbox, which in the case of 'con_use' would most likely result in the field containing an invalid value. To overcome this I have attempted to set up within the field definition a 'Validation by Calculation' option, but however I go about this it just does not want to work as I think it should. I have entered in the calculation box "Use In Correspondence" or "" and have unchecked the 'Validate only if field has been modified' box and have set the 'always validate data in this field' button. I always get the error 'con_use' is defined to contain only specific values. You must enter a valid value when I click on the checkbox then click somewhere else on the layout, which I don't think should be happening, as when clicking on the checkbox con_use is being given a valid value. My first thought was perhaps I entered the calculation in the calculation box incorrectly. Should it read con_use = "Use In Correspondence" or con_use = "" Hope the above all makes sense !! |
#5
| |||
| |||
|
|
In article <ev7rmt$4if$1$8302bc10 (AT) news (DOT) demon.co.uk>, "Jeff Wright" jeff (AT) jeffwright (DOT) demon.co.uk> wrote: Hi Using FM 8.5 Pro Adv on Windows XP I have a text field 'con_use', which I have placed on a layout as a checkbox. I have set up a value list with just one line 'Use In Correspondence', which I have set up to display in this checkbox on my layout. Obviously (I suppose its obvious!), the field in question, set up as it is on my layout, should equal one of two values, either 'Use In Correspondence' or an empty value. So far so good. Now I have noticed that it is possible to drag and drop values from fields to fields including checkboxes. I know it is possible to turn this option off, but it seems a useful option to keep enabled. As I say it is possible to drop a value into a checkbox, which in the case of 'con_use' would most likely result in the field containing an invalid value. To overcome this I have attempted to set up within the field definition a 'Validation by Calculation' option, but however I go about this it just does not want to work as I think it should. I have entered in the calculation box "Use In Correspondence" or "" and have unchecked the 'Validate only if field has been modified' box and have set the 'always validate data in this field' button. I always get the error 'con_use' is defined to contain only specific values. You must enter a valid value when I click on the checkbox then click somewhere else on the layout, which I don't think should be happening, as when clicking on the checkbox con_use is being given a valid value. My first thought was perhaps I entered the calculation in the calculation box incorrectly. Should it read con_use = "Use In Correspondence" or con_use = "" Hope the above all makes sense !! As Grip says, this second version is correct. Another way is to use the Validation option "Member of value list". This option only allows the field to be empty or one of the values on the chosen value list. There is also another annoying "feature" to be aware of (that also turns up in web broswer forms) - you can actually enter multiple values in a Radio Button field instead of the usual ONE choice only. This means that testing even a Radio Button field for a particular value should not be done using If (Field = "Option", ...) Instead the PatternCount or Position functions should be used. ie. If (PatternCount(Field, "Option") <> 0, ...) or If (Position(Field, "Option", 0, 1) <> 0, ...) Helpful Harry Hopefully helping harassed humans happily handle handiwork hardships ;o) |
![]() |
| Thread Tools | |
| Display Modes | |
| |