New Bug Encountered:Recent Error when using an IF/ENDIF in an email attachment template

Until recently IF/ENDIF expressions in a workflow using an email attachment template have been working well. Now and for the last few days it doesn’t work and workflow TEST gives the following error message. Remove the IF/ENDIF expressions and it works and the email with attachment is generated. Ant help appreciated. Thanks
"# Error

Something has gone wrong!

The URL is: /template/showtable?appName=994cb1e0-460f-4d3b-9d11-498707701933&workflowRuleName=Print%20Recent%20Register%20Additions&locale=en-GB&tzOffset=-60&location=0%2C%200&settings=%7B%22_RowNumber%22%3A%220%22%2C%22_EMAIL%22%3A%22%22%2C%22_NAME%22%3A%22%22%2C%22_LOCATION%22%3A%22%22%2C%22Options%20Heading%22%3A%22%22%2C%22Option%201%22%3A%22%22%2C%22Option%202%22%3A%22%22%2C%22Country%20Option%22%3A%22%22%2C%22Language%20Option%22%3A%22%22%2C%22Option%205%22%3A%22%22%2C%22Option%206%22%3A%22%22%2C%22Option%207%22%3A%22%22%2C%22Option%208%22%3A%22%22%2C%22Option%209%22%3A%22%22%2C%22_THISUSER%22%3A%22onlyvalue%22%7D
You might be accessing a page that doesn’t exist.
Please contact support@appsheet.com."

It would be interesting to know what your If/EndIf formula is… and the content where it is, thanks.

Aleksi, The app is under development, substantially completed, mainly the reporting to do. The core of it is a Register of plant cultivars with a number of defining characteristics for each cultivar in a ‘Register’ table. Reporting is 1. a ‘Full’ report, 2. an ‘Additions’ report of all cultivars added since the last ‘Full’ report, and 3. a ‘Recent’ report of all additions since the last ‘Recent’ report. Each type of report is identical in that I only want to report the elements that are not blank, hence the critical ISNOTBLANK. Reporting to a pdf attachment on an email. All controlled and working (apart for the candidate cultivar filtering by Registration status and date of registration still to do) from a Reports table with Actions for each type of report and 3 workflows. Snippet from the script follows. I hope this helps. Thanks

Registered Nerine cultivars

<<Start: Select(Register[RandKey], [Application Status] = “Registered”)>>
Cultivar: <<[Cultivar]>>

<<If: ISNOTBLANK([Photo1])>> <> <>

<<If: ISNOTBLANK([Name of Registrant])>> Name of Registrant: <<[Name of Registrant]>> <>

about 30 more If/EndIf’s…….

<>

Aleksi. Hold on for a moment. I have transcribed the script incorrectly

This is what I get when I copy from the gdoc

Registered Nerine cultivars

<<Start: Select(Register[RandKey], [Application Status] = “Registered”)>>

Cultivar: <<[Cultivar]>>

<<If: ISNOTBLANK([Photo1])>> <<Photo1>> <<EndIf>>

<<If: ISNOTBLANK([Name of Registrant])>> Name of Registrant: <<[Name of Registrant]>> <<EndIf>>

…… about 30 more

<>

It is probably because I have been changing the “Rollout”.

When we introduce a new feature, we only release the new feature in stages. At first, the new feature is only available for a few non-paying users. We then gradually ramp up the number of non-paying users who have access to the new feature. We then start making the new feature available to a few paying users. We then gradually ramp up the number of paying users who have access to the new feature… Finally, everyone can use the new feature.

We do this through what we call a “Rollout”. The “Rollout” controls the percentage of Free and Paying users who have access to the feature at each point.

We do this to reduce risk to you. Every change has the potential to introduce problems. By using a 'Rollout" we can make the new feature gradually available while providing time for us to find any problems the feature may have introduced. We watch the “Rollout” carefully. We try to fix any problems that may occur as quickly as possible.

I am in the midst of doing the “Rollout” of the workflow If expression feature. This feature is very complex and it required significant changes to how workflow templates are validated and executed. As a result, I am doing a very gradual “Rollout”.

Yesterday, a user reported a problem regarding how If expressions are parsed. When I fixed that problem, I reduced the number of users who have access to the If expression feature. I wanted to provide more time to verify that I had not introduced a problem with my most recent change.

That may have affected you. If you let me know your account id, I can explicitly add you to the “Rollout”. That will ensure that you can use the If feature in your templates.

1 Like

Thanks Aleksi and Phil for your responses. My account ID is 181035

I will try again tomorrow evening and get back to you

Based on your account id of 181035 the “Rollout” is not the problem. That account is on a Free pricing plan. As a result, your application already has full access to If expressions in workflow templates. It is only Paid accounts that currently have limited access to If expressions in workflow templates.

I tried invoking application “NerineApp-181035” rule “Print Recent Register Additions” using the “Test” button on the Behavior > Workflow pane. When I did that I got the following error:

Workflow rule ‘Print Recent Register Additions’ action ‘Action Print Recent’ Attachment template. Expression ‘[Date Registered]> “18/03/2019”’ is invalid due to: Arithmetic expression ‘([Date Registered] > “18/03/2019”)’ does not have valid input types.

That error is occurring because when you specify a Date constant in a workflow rule, the Date must be in MM/DD/YYYY format.

In your template, change the If expression to look like this:

If: [Date Registered] > “03/18/2019"

Please fix this problem and then let me know if the workflow rule is working.

If not, please ensure that the workflow rule is in the failing state and provide:

  1. The account id (I assume this is 181035.)
  2. The application name (I assume this is “NerineApp-181035”.)
  3. The workflow rule name (I assume this is “Print Recent Register Additions”.)
  4. The exact error message.
  5. The exact steps to reproduce the problem.

Phil, thanks for your response. All your assumptions are correct. The error resulting from the incorrect date expression is now fixed and the report still fails. Hamburger, Reports, select Register Recent, Action button and confirm. The report (an abridged version follows) is working well with the following script:

Nerine Register Recent Additions

<<TODAY()>>

Registered Nerine cultivars:

<<Start: Select(Register[RandKey],AND( [Application Status] = “Registered”, [Date Registered] > “03/18/2019”))>>

Cultivar: <<[Cultivar]>>

<<[Photo1]>>

Name of Registrant: <<[Name of Registrant]>>

Raiser or breeder]: <<[Raiser or breeder].[Name]>>

Year first flowered: <<[Year first flowered]>>

Year and place first shown to public: <<[Year and place first shown to public]>>

Year and publication of first reference to this cultivar: <<[Year and publication of first reference to this cultivar]>>

If a seedling, give name of seed and pollen parents, if a sport, give cultivar name: <<[Lineage]>>

<<End>>

Conditionally Registered Nerine cultivars:

<<Start: Select(Register[RandKey],AND( [Application Status] = “Conditional”, [Date Registered] > “03/18/2019”))>>

Cultivar: <<[Cultivar]>>

Application Status is <<[Application Status]>> on: <<[Condition to be met]>>

<<[Photo1]>>

Name of Registrant: <<[Name of Registrant]>>

Raiser or breeder]: <<[Raiser or breeder].[Name]>>

Year first flowered: <<[Year first flowered]>>

Year and place first shown to public: <<[Year and place first shown to public]>>

Year and publication of first reference to this cultivar: <<[Year and publication of first reference to this cultivar]>>

If a seedling, give name of seed and pollen parents, if a sport, give cultivar name: <<[Lineage]>>

<<End>>

I do not want to report the empty nodes so I want a conditional ISNOTBLANK on almost every line, like this:

<<If: ISNOTBLANK([Colour description])>> Colour description (chart): <<[Colour description]>> <<EndIf>>

I have left the report with this line added to the script so it will fail.

The report fails silently and no email is sent. On TEST I get the message:

Something has gone wrong!

The URL is: /template/showtable?appName=994cb1e0-460f-4d3b-9d11-498707701933&workflowRuleName=Print%20Recent%20Register%20Additions&locale=en-GB&tzOffset=-60&location=0%2C%200&settings=%7B%22_RowNumber%22%3A%220%22%2C%22_EMAIL%22%3A%22%22%2C%22_NAME%22%3A%22%22%2C%22_LOCATION%22%3A%22%22%2C%22Options%20Heading%22%3A%22%22%2C%22Option%201%22%3A%22%22%2C%22Option%202%22%3A%22%22%2C%22Country%20Option%22%3A%22%22%2C%22Language%20Option%22%3A%22%22%2C%22Option%205%22%3A%22%22%2C%22Option%206%22%3A%22%22%2C%22Option%207%22%3A%22%22%2C%22Option%208%22%3A%22%22%2C%22Option%209%22%3A%22%22%2C%22_THISUSER%22%3A%22onlyvalue%22%7D
You might be accessing a page that doesn’t exist.
Please contact support@appsheet.com."

Thank you and I hope this helps.

Sorry Andrew,

If testing goes well the change will be released on Monday 4/8/2019 in the afternoon Seattle time.

1 Like

Thanks Phil. I will save the test script and test it again next week. Please can you let me know if there is any delay beyond Monday.

Recent fix has resolved the problem. Many thanks to Appsheet team

Thanks for the update!
I am really happy to hear that it is working for you.