How to change the output valve based off the input valve from form

I have a form with buttons that say Initial visit, injury known, and some other names. I have a prewritten statement that I would like to have displayed on the pdf that gets created when I select yes to create pdf. I am wondering how I can change the output of the button from its name to the statement, but only show that statement on the pdf. In the apps database table and column would still show the original button text value. Another option would be to have the prewritten statement be entered on the table/column/row when selecting the corresponding button instead of the shown text value when originally selecting it in the form. This option, I would still like to be able to display on the pdf and figure it would using the correct <<[tag]>> wording. 

I am aware that I could just enter the statement in longtext form but do not want to see a bunch of statements vs one or two words that I know correspond to a statement that is wanted.

I am new to appsheet so thank you for your help!

UPDATE: the buttons are enumlist type

Solved Solved
0 10 147
1 ACCEPTED SOLUTION

Remove all spaces and line breaks between your <<IF>>/<<ENDIF>> blocks.

Marc_Dillon_0-1673321058534.png

 

View solution in original post

10 REPLIES 10

Use an IF expression in the pdf template.

Can you show me an example and where would I enter this? I am thinking maybe on my google docs template. This is the template I use to populate the information from the app to the pdf. I have the <<[*******]>> used in the template.

Thank you

<<IF( [col] = "x" , "y" , "z" )>>

https://help.appsheet.com/en/articles/2355953-if

Or a template-if as with the article Steve just linked.

Steve
Platinum 4
Platinum 4

Thank you to both of you. I will try this out and update 

So now the issues displayed are shown below. I think it is because there are more than one choice because the type is an Enumlist with a base type of text with auto-complete other values checked. The choices in the Enumlist are Unknown injury, Known Injury, and Maintenance

  • Error 1 : Task 'Email EQ note to client' Attachment template. Expression '([visit summary] =  โ€œunknown injuryโ€)' is invalid due to: Cannot compare List with Text in ([visit summary] = "unknown injury").
  • Error 2 : Task 'Email EQ note to client' Attachment template. 'If' expression '([visit summary] =  โ€œunknown injuryโ€)' yields a result of type '' rather than the expected type 'Yes/No'.

This is the code I have written:

<<If: ([visit summary] =  โ€œunknown injuryโ€)>>

During the equine chiropractic exam, it was observed that the patient was exhibiting signs of hesitation when performing certain movements, abnormal behavior, and stiffness. These changes in the patient's behavior may be due to an underlying issue that is currently unknown. It is important to conduct further assessments and evaluations in order to determine the cause of these issues and determine the appropriate course of treatment to help them return to optimal function and comfort.

<<EndIf>>

 

Thank you for the help. I was able to get what I needed with contains. This way I would use different statements when checking different options in appsheet form. 

Do you happen to know how to remove all the extra space on the pdf template (google docs) when only one of 4 options is choosen. So if the top and bottom options are choosen and there are other options in the middle, this is causeing a large space in between the statements or above and below different options because those are the sections that were not checked in the appsheet form. 

Remove all spaces and line breaks between your <<IF>>/<<ENDIF>> blocks.

Marc_Dillon_0-1673321058534.png

 

That would be what I had wrong. Thank you

Top Labels in this Space