"17 separate fields" might be better off as "17 related records"--one for each field.
Using your current design, you simply need 17 set field steps to assign "normal" to each field in turn. Then your button on your layout performs this script.
The script will look like:
Set Field [YourTable::motionField1 ; "normal" ]
Set Field [YourTable::motionField2 ; "normal" ]
and so forth for all 17 fields.
If your field names are identical except for a number such as I used in my example, you can also use set field by name in a loop to do the same thing:
Set Variable [$K ; Value: $K + 1 ]
Exit Loop If [$K > 17 ]
Set Field By name [ "YourTable::motionField" & $K ; "normal" ]
The first approach is fine. I wanted the wall motion field to be a radio button or checkbox style. It doesnt seem to work for this control type. For an edit box or drop down control type the script works fine.
Any suggestions??Many thanks
You need to explain what you need to happen in more detail. It works exactly the same regardless of control type. A radio button format, by implication, would be for entering a single value into the field and the script should work equally well for it as long as the value entered by the script is exactly the same as the corresponding value in the value list. If it is even one letter different, then the value entered by the script is still entered into the field, but the value list will hide it from view.
Checkboxes on the other hand, suggest that you want to be able to select multiple values in the same field. The script I posted will still work, but any previously entered values will be replaced by the single value entered by the script. If you need to add "normal" to the field without overwriting previously selected values and different expression has to be used in the set field step.
Thnaks for your assistance. Indeed the fields did not match precisely. I now have learnt how tro use this very useful function