Forum Discussion

ChrisChris's avatar
ChrisChris
Qrew Assistant Captain
8 years ago

Counting selections in multi select text field...

Hi,
I have the following formula numeric field to count the number of times, up to three, I have sent a notification to someone::

===
If(Contains(ToText([Sent Invitation Today-Notice to Requestor]),"1st notification to requestor"),1,null)+
If(Contains(ToText([Sent Invitation Today-Notice to Requestor]),"2nd notification to requestor"),1,null)+
If(Contains(ToText([Sent Invitation Today-Notice to Requestor]),"3rd notification to requestor"),1,null)
===

The formula saves without error, but does not return anything and it should. Can someone tell me what I'm doing wrong?
Thank you,
Chris
  • ChrisChris's avatar
    ChrisChris
    Qrew Assistant Captain
    Figured it out. The code should read::

    ===
    If(Contains(ToText([Sent Invitation Today-Notice to Requestor]),"1st notification to requestor"),1,0)+
    If(Contains(ToText([Sent Invitation Today-Notice to Requestor]),"2nd notification to requestor"),1,0)+
    If(Contains(ToText([Sent Invitation Today-Notice to Requestor]),"3rd notification to requestor"),1,0)
    ===

    Can't add a null apparently. 
    Thank you for your support.
    Chris