Jump to content
  • 0

Calculation to change Users url destination on Submit


Hiperf
 Share

Question

I am trying to calculate my users Destination URL based on a Y/N field in another table. Current Table is tblSubmission looking to tblProperty based on SMNPropertyID to PropertyID

Here's my Calculation:

SELECT Property1978 FROM tblProperty WHERE PropertyID = target.[@field:SMNPropertyID] 

CASE
      WHEN [@field:tblProperty1978] = 'Y' THEN 'h.html' 
      ELSE 'i.html' 
   END
Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hello @Hiperf,

I would like to add that you need to compare the Yes/No field values with 1 or 0, not with 'Y'/'N'.

 

If this is the Submission form, you may add Virtual field -> set to the Calculated value with formula:

SELECT Property1978 FROM tblProperty WHERE PropertyID = target.[@field:SMNPropertyID]

 

In the second Virtual field use the formula:

CASE WHEN [@cbParamVirtual1] = 1
THEN 'h.html'
ELSE 'i.html'
END

And add this virtual field 2 as a destination after record submit.

Rgl9ZAY.png 

Maybe this article is helpful https://howto.caspio.com/tech-tips-and-articles/common-customizations/dynamic-redirects-after-form-submission/

Link to comment
Share on other sites

  • 0

Hi @Hiperf,

I suggest to ad two calculated field, for the first calculated field insert the select statement and then on the second calculated field use case statement. After that on the destination configuration simply add the calculated field.

For more information you may check these links:
- https://howto.caspio.com/function-reference/
- https://howto.caspio.com/datapages/reports/advanced-reporting/calculations-in-forms-and-reports/

I hope this helps ^__^

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...