Say I have a yes/no field "Banana" and if it is checked, I want to assign the text "Banana" to the field "Fruit Type". I thought an Auto Assign rule for the Banana field "A:Fruit Type="Banana"" might do it. But it seems that the rule will not trigger for items where the "Banana" field is already checked when the rule is created. I can double-click on the Banana field to bring up the items in a scratch grid, and I added the Banana field as a column. Then I highlighted all the items in the column, pressed space to clear the checkmark, then space again to re-check the items. This works to assign the text "Banana" in the "Fruit Type" column. Is there an easier way to get the rule to fire without having to do these extra steps?
How do I ?
Comments
Hi jimspoon, I think you…
Hi jimspoon,
I think you might achieve what you want by using a row-equation instead of an auto-assign rule as you can set these to auto-update.
See here (in the manual).
This is the info on automatic recalculation:
HTH
Left
I think you might achieve…
Auto-update should only be used when the equation contains a "Now" variable. In these cases, the value needs to be recomputed when the day changes. Otherwise, equations are recomputed whenever a field value (used in the equation) changes
Thank you Left, I tried that…
Thank you Left, I tried that out.
I made a text field named TestEquation, and in the Row Equation box I put the following:
=iif([Display Adapters],"Display Adapter",[TestEquation])
When I clicked the Recalculate button, for every item for which the Y/N field "Display Adapters" was checked, the TestEquation was filled with the text "Display Adapter". If the "Display Adapters" field was not checked, the text if any in theTestEquation field was not changed.
IIF is not a native VBScript function but a User Defined IIF function is included in the System Code section of the VB Editor tab. It didn't work until I added the third argument.
it works! but I'd have to change the Row Equation to have it generate values for "TestEquation" other than "Display Adapter". Because of this it might be better if I could set an Auto-Assign for the [Display Adapters] field and any other Y/N fields I might want to push some text into the "TestEquation" field, and do a Recalculate to trigger that Auto-Assign for items that already have those Y/N fields set.
I bet I can figure out how to change the IIF function to output the name of the Y/N field as a text value to the text field containing the row equation. Maybe there is a FieldName function somewhere.
Hi, Auto-assign rules are…
Hi,
Auto-assign rules are much more flexible than row equations, especially for complex cases (i.e. multiple checkboxes)
Provided your rule has AM: (not just A:), a quick way is to select the checkbox cells (or the whole column) and do Edit > Touch. It basically executes the M: rule
Lol, I've been wondering for…
Lol, I've been wondering for months now what 'Touch' actually does. Could not find anything in the documentation when I began wondering. Much the wiser now...
Could not find anything in…
Did you live-search "Touch" in the Welcome to IQ IQBase? It is explained under the Edit Menu