Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Triggers help - When i select a field, one more field should also get selected

Hi Everyone,

I have a condition when ever we select a field it should also select 1 other field. I dont know how to put it. Suppose if we have 2 fields 'A' and 'B'. When ever I select something from 'A', value in field 'B' should also get selected by default. Its like clicking once and selecting 2 different fields. I know that I have to use triggers to achieve this, but I couldn't get it done. 

Please help.

Thanks,

Abhi

1 Solution
4 Replies
sunny_talwar

What would be the basis for the selection? Will A and B have the same exact values?? It would be ideal if you can pull together a sample.

Best,

Sunny

bdiamante
Contributor III
Contributor III

Set an OnSelect trigger on [Field A]. Go to Settings -> Document Properties -> Triggers (tab). Under the Field Events header, find [Field A]in the list and then click the Add Actions button under OnSelect.

The parameters should be:

Action type: Select in Field

Field: [Field B]

Search String: the value that should be auto selected in Field B. If it's exactly what is selected in Field A, you could use:

getFieldSelections([Field A])

if Field A is not in the default state, try:

'(' & concat({State-Name} distinct [Field A], '|') & ')'

Alternate State: Choose the state where you want the selections to be made in Field B. Leave blank if you are using the default state.

Brian

Not applicable
Author

Thats it, Massimo. Thats exactly what I was looking for. Thanks you so much and thanks to rwunderlich