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%20R...
You might be accessing a page that doesnโ€™t exist.
Please contact support@appsheet.com."

Solved Solved
0 12 827
1 ACCEPTED SOLUTION

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

View solution in original post

12 REPLIES 12

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.

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%20R...
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.

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.

Top Labels in this Space