Jump to content

Need help comparing field to Value List...


This topic is 2802 days old. Please don't post here. Open a new topic instead.

Recommended Posts

  • Newbies

I have a Value List with names of our "partners" (each name on separate line).

I have a database with a "name" field. 

I'm just trying to setup a script to run and check if the "name" matches a names on the "partners" value list. But, no matter what I try, it never comes back as "true." 

Any advise? Does this look correct below? Each time, the result is "0" not "1." 

FilterValues(ValueListItems(Get(FileName);"Partners");Data Recovery Log Excel export Converted::Name)

 

Thank you for your help! 

Brian

Link to comment
Share on other sites

No, that is not correct, and as currently written, 1 or 0 cannot be the result of your calculation. 

If "Jones" is one of the values in the value list; and "Jones" is in the Excel name field; then the result of your calculation will be "Jones"

If written this way, then the result should be what you are looking for.

GetAsBoolean( ValueCount( FilterValues(ValueListItems(Get(FileName);"Partners");Data Recovery Log Excel export Converted::Name)))

Link to comment
Share on other sites

1 hour ago, Brian Cometa said:

FilterValues(ValueListItems(Get(FileName);"Partners");Data Recovery Log Excel export Converted::Name)

To make this return a Boolean result, you can wrap it in IsEmpty(). Or - if you prefer - not IsEmpty().

In addition, FilterValues ( item ; list ) is faster that FilterValues ( list ; item ).

 

 

Edited by comment
Link to comment
Share on other sites

This topic is 2802 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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.