Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Experts, hoping you can help me.
I'm looking to get one of my list boxes to automatically highlight its value when there is one value in it.
I.E - customer selects a different List box that shows them a Part number. they select a part number and another list box, that contains batch numbers associated with that selected part shows. when the return from the batch number list box is = 1, the list box should automatically select it so that the associated graph update as well.
any ideas?
thank you,
Ciaran
Selection of a field value is an ACTION. actions can be done 2 ways: 1st by a user actually clicking, and 2nd by Triggers.
i would generally shy from using triggers because it can get cleared when there is no data for the field that triggers the action. but to answer your question directly and as a learning exercise,
set a trigger for the PART. when the PART is selected or changed, set the action to SELECT FIELD BATCH to ONLY(BATCH)
when a single value of PART is selected, the BATCH associated with that will automatically be selected. of course you need to expand on that. you have to account for what if multiple values are selected what possible user experience you want to program for - what is expected, and all that fun stuff
HAVING SAID THAT... i suggest do it a different way instead (and this im saying without knowing what other business rules/requirements you have). if what you want for example is to enable a chart that is dependent on a BATCH being selected, change the logic a little and set it SAY, conditional to count(distinct BATCH) = 1, or getpossiblecount(BATCH)=1
hope that helps
Selection of a field value is an ACTION. actions can be done 2 ways: 1st by a user actually clicking, and 2nd by Triggers.
i would generally shy from using triggers because it can get cleared when there is no data for the field that triggers the action. but to answer your question directly and as a learning exercise,
set a trigger for the PART. when the PART is selected or changed, set the action to SELECT FIELD BATCH to ONLY(BATCH)
when a single value of PART is selected, the BATCH associated with that will automatically be selected. of course you need to expand on that. you have to account for what if multiple values are selected what possible user experience you want to program for - what is expected, and all that fun stuff
HAVING SAID THAT... i suggest do it a different way instead (and this im saying without knowing what other business rules/requirements you have). if what you want for example is to enable a chart that is dependent on a BATCH being selected, change the logic a little and set it SAY, conditional to count(distinct BATCH) = 1, or getpossiblecount(BATCH)=1
hope that helps
Hi Edwin,
yes you are absolutely right with your comment. i think the best way would be to change the conditional on my graphs. i had it set to getSelectedCount but your other advice for distinct works better.
thanks you!