quillpro Posted October 3, 2005 Posted October 3, 2005 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
mr_vodka Posted October 3, 2005 Posted October 3, 2005 In your script, try If [PatternCount ( ValueListItems ( Get ( FileName ) ; "YouValueList" ) ; Field1 ) > 0] Show Custom Dialog [ "Part of Value List" ] End If
Breezer Posted October 3, 2005 Posted October 3, 2005 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”]
quillpro Posted October 3, 2005 Author Posted October 3, 2005 Thanks for the advice. I will give these a try.
Recommended Posts
This topic is 6993 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now