DesiLogi Posted June 19, 2020 Report Share Posted June 19, 2020 Does anyone know how to use 'contains' in a calculated field to see if the field contains a certain value, instead of using = to equal it. I have a tale with records that have a field with values like 524_789B, 524_788B, 524_794B, 524_791B, 524_1047B. And an authenticated field value might be 524_794B. I want to count the number of records that contain 524_794B. So in a calculated field I need something like below: SELECT COUNT (ItemID) FROM _V_Items Where Assigned_To CONTAINS '[@authfield:Users_CID_StaffID]' What is the syntax for 'contains'? Quote Link to comment Share on other sites More sharing options...
0 CoopperBackpack Posted June 19, 2020 Report Share Posted June 19, 2020 Hello @DesiLogi, Please try to use the LIKE operator with '%' wildcards. For example: SELECT COUNT (ItemID)FROM _V_Items Where Assigned_To LIKE '%[@authfield:Users_CID_StaffID]%' Hope this helps. Quote Link to comment Share on other sites More sharing options...
0 DesiLogi Posted July 14, 2020 Author Report Share Posted July 14, 2020 Hi CopperBackpack, Sorry about the late reply (couldn't get to this part of the project till now) but THANKS for the solution on this, it really helps! Quote Link to comment Share on other sites More sharing options...
Question
DesiLogi
Does anyone know how to use 'contains' in a calculated field to see if the field contains a certain value, instead of using = to equal it.
I have a tale with records that have a field with values like 524_789B, 524_788B, 524_794B, 524_791B, 524_1047B.
And an authenticated field value might be 524_794B.
I want to count the number of records that contain 524_794B. So in a calculated field I need something like below:
SELECT COUNT (ItemID)
FROM _V_Items Where Assigned_To CONTAINS '[@authfield:Users_CID_StaffID]'
What is the syntax for 'contains'?
Link to comment
Share on other sites
2 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.