I've attempted to use IF in my template to hide certain columns if they are TRUE.
These are my attempts
<<If: ([Check End Of Day Report Has Been Completed?]=FALSE)>>Check End Of Day Report Has Been Completed?: <<[Check End Of Day Report Has Been Completed?]>><<EndIf>>
<<If: ([Check End Of Day Report Has Been Completed?]="FALSE")>>Check End Of Day Report Has Been Completed?: <<[Check End Of Day Report Has Been Completed?]>><<EndIf>>
But I get the following error for each of my columns
Error 4 : Task 'Create Negative PDF' Body template. Expression 'If: ([Check End Of Day Report Has Been Completed?]=FALSE)' is invalid due to: Unable to find function 'IF:', did you mean 'IF'?.
Where am I going wrong?
The first one (=FALSE) should work, but the second (="FALSE") is definitely wrong.
Please post a screenshot of your template showing the general area where you're using the template-if tag so we have some context.
Thanks Steve, FYI, this link in the post is broken.
I found the documentation by googling it after seeing the address though so it was still helpful.
Regarding the screenshot, I have about 25 questions and the structure is the same for all of them.
This might be a problem:
Note the trailing space in the first reference but not in the second. That might cause a problem.
Y/N columns doesn't need you to compare them to anything, I prefer using NOT([Y/N]) when I need to check if it's false.
Try:
<<If:NOT([Check End Of Day Report Has Been Completed?])>>Check End Of Day Report Has Been Completed?: <<[Check End Of Day Report Has Been Completed?]>><<EndIf>>
I tried this...
<<If:NOT([Check End Of Day Report Has Been Completed?])>>Check End Of Day Report Has Been Completed?: <<[Check End Of Day Report Has Been Completed?]>><<EndIf>>
Got this...
Error 4 : Task 'Send Email with notes and PDF' Attachment template. Expression 'If:NOT([Check End Of Day Report Has Been Completed?])' is invalid due to: Unable to find function 'IF:NOT', did you mean 'FIND'?.
I also went back and renamed all my columns to remove special characters etc and thought I was on to something but I got the following error again
Task 'Create Negative PDF' Body template. Expression 'If:NOT([Check_End_Of_Day_Report_Has_Been_Completed])' is invalid due to: Unable to find function 'IF:NOT', did you mean 'FIND'?.
You could try
<<IFS(NOT([Check_End_Of_Day_Report_Has_Been_Completed]) ,"Check End Of Day Report Has Been Completed?: " )>> << IFS(NOT([Check_End_Of_Day_Report_Has_Been_Completed]) , [Check_End_Of_Day_Report_Has_Been_Completed]>>
or alternatively
<<IFS(NOT([Check_End_Of_Day_Report_Has_Been_Completed]) , CONATENATE("Check End Of Day Report Has Been Completed?: " , [Check_End_Of_Day_Report_Has_Been_Completed] ))>>
Could you share your whole template? An screenshoot would be enough.
Sometimes these errors are there when the expression can't find the <<EndIf>>
Hi everyone, thanks for the assistance. I built this app when I first started in Appsheet and all my columns had special characters etc. So I went back to the drawing board and removed all of them and now it seems to be working.
I now have a lot of gaps in my results. Is there a way to not have gaps where I don't show items.
Will a nest if expression solve it?
User | Count |
---|---|
35 | |
31 | |
30 | |
18 | |
17 |