Discussions

 View Only
  • 1.  Counting selections in multi select text field...

    Posted 07-13-2017 19:17
    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


  • 2.  RE: Counting selections in multi select text field...

    Posted 07-13-2017 19:55
    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