October 3, 200520 yr How can I compare a fields content against the values in a value list as a script step. My attempts so far have failed. Thanks
October 3, 200520 yr In your script, try If [PatternCount ( ValueListItems ( Get ( FileName ) ; "YouValueList" ) ; Field1 ) > 0] Show Custom Dialog [ "Part of Value List" ] End If
October 3, 200520 yr Not quite sure what you are trying but you can use a calculation to compare the contents of a field using the function "IsValid()" For your value list you can define the value list to "Use Values From Field:" then specify the field. Say you have a table with the following as your Value List contents. I will call this field "ValueList" with the following contents: Bill Joe Kim Tom Henry Set up a relationship using fields “FirstName” to “ValueList”. I will call this relationship “Exists” Now in the Master Table we have the following fields “FirstName” and “ExistsInList” The "FirstName" field has the following contents: Bill Kim Elizabeth Susan For the field called "ExistsInList", set it up as an unstored calculation as follows: Isvalid (Exists::ValueList) Any field content that is in the ValueList will have a “1” in the field “ExistsInList” you can then set up a script to find where the field has a “1”. For this example, the “ExistsInList” for Kim and Bill will have a “1”. The script could be something like: Enter find Mode[] SetField [“ExistsInList] Perform Find[] If you are comfortable with scripting, you can reduce it to: Perform Find [ Restore] Note: where [Restore] is Exists::ExistsInList[“1”]
Create an account or sign in to comment