I created a value list based on an existing field, then added a drop down to my layout. Then, I created a script to search for the selected value. This worked fine; however, after the script ran, the drop down often showed an incorrect value (even though the script worked as intended). To fix this, I added a script step to enter the selected value in the field. I would expect the value to list to display the correct value without being "forced" to do so. Is this normal behavior?
We would need to see the script to know. And a lot will depend on the field you are using, how you are using it, and then what your script is doing with that field.
Initially it sounds like you may be using a normal field to set the search criteria. If you end up on a different record after the search, that record will show whatever value was selected when you did a find from that record. But this is making a lot of assumptions.
Is PREVIEWSTEMP::categoryFilter a text field with global storage? Or is it just a normal field?
PREVIEWSTEMP::categoryFilter is a normal field.
That is why the value is different. My assumptions in my first reply were correct.
So, the correct procedure would be to use a global field?
If you are only using that field as a way to enter the search criteria, yes. If that field is actually data, then no.
A global field has the same value for all records. If you search for "Invoices", just as an example, looking at that field on any record would show "Invoices". If you change that value to "Purchase Orders", you would see "Purchase Orders" on every record. Since it's basically a temporary holding place for what you are searching for, that works.
Thanks, Josh. I appreciate your help.