I have two fields on a form -- one is item type, the other is item options. They are both dialog lists with formula for choice. I am using @dblookup in item options with item type as the key to search for the value for its options.

Every time I change the item type based on the dialog list choice I want my item options to change to the list for the item type. I have tried call uidoc.refresh and uidoc.save in the exiting event of the item type field, but it doesn't work -- it didn't change the item options.

You have to enable the "Refresh fields on keyword change" option in the itemType field, and the "Refresh choices on document refresh" option in the itemOptions field.

Note: If the user has already selected a value in the itemOptions field, that value will remain selected after the refresh even if it is no longer a valid selection. To fix this you would need an input translation formula in itemOptions that checks whether the current field value is valid, and if not, sets the field to "". E.g.: valid_choices := @DbLookup(""; ...; itemType;...); @If(@IsError(valid_choices; ""; @Keywords(valid_choices; @ThisValue))

Do you have comments on this Ask the Expert question and response? Let us know.

This was first published in January 2005

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: