Checking entire table column for value

supafly129supafly129 Member Posts: 454
edited August 2016 in Working with GS (Mac)

What's the best way to check an entire column in a table for a value/text? For instance, if any row of column 5 in the PurchaseTable = "purchased"

Tried playing around with tableSearch and the other functions but couldn't seem to find a solution. Seems like it would be simple enough to implement.

Comments

  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273

    The tableSearch function can do this. How do you have it set up?

  • supafly129supafly129 Member Posts: 454
    edited August 2016

    @Braydon_SFX Currently I have it set up like this with a text expression rule:

    I basically want a rule such as: WHEN any row in column 5 contains text "purchased", then Display Text XYZ

    I'm not sure how to accomplish this though because there is a blank box in the "Text Expression" rule in the second image I attached that needs to be filled as well. Would I omit the "key" in the tableSearch?

  • RossmanBrothersGamesRossmanBrothersGames Member Posts: 659

    i think you need to use a numeric expression because table search returns a number, and its 0 if it finds nothing.

  • supafly129supafly129 Member Posts: 454

    @RossmanBrothersGames ah I see that makes perfect sense, i think that should do the trick for what I need so I'll give that a try. thank you!

Sign In or Register to comment.