Jump to content
  • 0

Pass Calculated Field


Leigh

Question

I need to be able to pass a calculated field from a tabular report datapage to a submit datapage thru a link. The calculated field is 'Age'. it is calculated using the following:

SELECT CAST(DATEDIFF(YEAR,'[@field:Date_Of_Birth]',GETDATE()) AS VARCHAR(10)) + ',' + CAST(DATEDIFF(MONTH,'[@field:Date_Of_Birth]',GETDATE())-(DATEDIFF(YEAR,'[@field:Date_Of_BIrth]',GETDATE())*12) AS VARCHAR(10)) AS Age

I am passing other fields from the report to the submit page, but can't figure out how to pass the calculated field.

Thank you!

Leigh

 

Link to post
Share on other sites

3 answers to this question

Recommended Posts

  • 0
On 11/14/2016 at 5:17 PM, Leigh said:

I need to be able to pass a calculated field from a tabular report datapage to a submit datapage thru a link. The calculated field is 'Age'. it is calculated using the following:

SELECT CAST(DATEDIFF(YEAR,'[@field:Date_Of_Birth]',GETDATE()) AS VARCHAR(10)) + ',' + CAST(DATEDIFF(MONTH,'[@field:Date_Of_Birth]',GETDATE())-(DATEDIFF(YEAR,'[@field:Date_Of_BIrth]',GETDATE())*12) AS VARCHAR(10)) AS Age

I am passing other fields from the report to the submit page, but can't figure out how to pass the calculated field.

Thank you!

Leigh

 

Hi Leigh,

You may pass value of calculated field in the same way you pass regular field in query string.

For example:

<a href="URL_of_submission_form&age=[@calcfield:1]">name of the link</a>

In my example value of calculated field#1 will be passed. If you need to pass value of the Calculated field #2, the parameter will be: [@calcfield:2] and so on.

In a submission form you need to receive in a field the following parameter: [@age]

Hope it helps.

Please feel free to ask if something is not clear enough

Link to post
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...
×
×
  • Create New...