Default value of dropdown by query

jh

Member
Hi

I want to set a default value of a dropdown element on a form that is set from a query on another table - where the query is using the value selected in another element on the form (this element chosen will be the PK in another table so should return a specific value).

I have tried to set this via 'eval default' using a select statment but can not get it to work. Can it be done this way?

Many thanks
 
where the query is using the value selected in another element on the form
Defaults are only set in new records on form load (where usually all other elements are empty, too).
So do you really mean "Default" or do you want to set the dropdown depending on the change on an other element?
 
Hi

Thanks for the replies.

Troester: "So do you really mean "Default" or do you want to set the dropdown depending on the change on an other element?"
I think you are right that I am not really refering to a default value, but a value depending on a change in another element,sorry.
I have used a url placeholder (via a link) to set the value of the first element, that I then wanted that value to set the value of this other element I am refering to (hope that makes sense). I tried using a CDD but there is no relationship between the 2 elements, it is linked via a third - so I thought a query was need.

I hope this makes sense, and if there is a way of doing this I would be very greatful.

Kind Regards
 
I'm still not entirely sure what you need. You said you tried a CDD. Are you trying to set the actual selected option of a dropdown (but the options available stay the same), or are you trying to restrict / control which options get shown depending on the value of another element (which is what a CDD does, i.e. only show cities in Alabama on a 'cities' dropdown, when Alabama is selected on a 'states' dropdown)?

-- hugh
 
We are in need of some funding.
More details.

Thank you.

Members online

No members online now.
Back
Top