Thursday, October 18, 2018

Conditional choose-field trigger (2)

Almost exactly one year ago, I wrote a convoluted blog entry about choose-field triggers in Priority. It might be that I was wasting my time as there is a documented solution for what I was trying to achieve. From chapter 5 of the Priority SDK:

You can also write a specific CHOOSE-FIELD or SEARCH-FIELD for the procedure. Your trigger can contain references to any input value specified by the user within the same [emphasis mine] procedure step. For instance, if the procedure step contains an input parameter called CST, its value will be stored in the :PROGPAR.CST variable. This is useful, for example, if a given procedure step contains an input column for a Sales Rep and another input column for a Customer, and you want the Choose list for the latter column to display only those customers that are associated with the specified sales rep.

I emphasize the word 'same'. Looking again at the code which I presented in the blog from last year, the 'input value specified by the user' comes from a previous step in the procedure and not the same step. 

No comments: