Forum Discussion

JackWoods's avatar
JackWoods
Qrew Trainee
8 months ago

IF Statement based on a file being attached

Greeting - I want to do an IF Statement to tell me if a file has been attached to the record or not. it does not seem to be working when i say Attachment=True. 

how could should I format my text formula field to tell me an attachment is present?

If([Attachment]="true","Yes","No")

  • ToText([Attachment])!="" will check if the file is present or not. 

    The only catch is that it will not be picked up until after the record is saved since the file is actually committed to the DB until that. 

  • ToText([Attachment])!="" will check if the file is present or not. 

    The only catch is that it will not be picked up until after the record is saved since the file is actually committed to the DB until that. 

  • Thank you! I figured it out a similar way by changing the formula to a checkbox instead of text. "If([Attachment]="",false,true)"

    • MikeTamoush's avatar
      MikeTamoush
      Qrew Commander

      Similarly, this will also work (assuming a formula checkbox):

      [Attachment]>""

      You dont even need the if statement, as long as your formula is satisfying the true condition.