Skip to main content
Question

Matching text and text list

  • April 21, 2023
  • 0 replies
  • 335 views

Hello Community, 
I am trying to match a text field with a text list formula field, by using the contains functions but it is not giving me an exact match. 
eg : if text list contains apple ; oranges and my text field is apple it is giving an exact match but even if i write app it will still give me a match.

Is there a better way to find the match? I want to tick a checkbox based on this match.



------------------------------
richa shubham
------------------------------
This topic has been closed for replies.

Forum|alt.badge.img+5
  • Registered
  • April 24, 2023

Use a query formula with "has"

// the first half of the query {3.EX." & [Record ID#]  is there to limit the search to this record only
//replace _fid with the field ID of the multi-select field and [Text Field] with the name of the text field
var text qry = "{3.EX." & [Record ID#] &"} AND {_fid.has." & [Text Field] &"}";
//size should only be able to return 0 or 1, so if it is 1 return true and check the checkbox
Size(GetRecords($qry)) = 1


------------------------------
Simon H
------------------------------