Jump to content
  • 0

calculated field to create a url with parameters



Ok - so this has me completely stumped. In a report table I've been able to create a calculated field that I can then read into html that provides a link with all the right parameters to pass based on the record details.  

This is what I used to create the link:

CASE WHEN ([@calcfield:6]) =0  THEN "No action"
ELSE '<a href="https://picklework.com/manager-skills/skills-endorsement/?AsID=' +CAST([@calcfield:7] AS varchar) +  '">Evaluate</a>'

But I just can't get a similar formula to work in a details page of a report. I've played with so many different formats and just can't see what I'm doing wrong. This is my latest attempt:

CASE WHEN [@calcfield:1] >= [@field:count1]  THEN "Complete"
WHEN  [@calcfield:11] >= [@field:count1] THEN "Waiting approval"
ELSE "<a href='https://www.picklework.com/employee/program-progress/?ProgID=" + CAST([@field:progid#] AS varchar) + "&item=" + CAST([@field:mod1#] AS varchar) + "&num=1&erid=" + CAST([@field:enrolid#] AS varchar) +"'>Add item</a>"

This is what is returned:

<a href='https://www.picklework.com/employee/program-progress/?ProgID=+ISNULL(CONVERT(nvarchar(max),&item=+ISNULL(CONVERT(nvarchar(max),&num=1&erid=+ISNULL(CONVERT(nvarchar(max),'>Add item</a>

Any ideas on what I'm doing wrong here??? Any help would be much appreciated. Thanks

Link to comment
Share on other sites

2 answers to this question

Recommended Posts

  • 0

Hi @Jodie

I have tried this on my account and I got the formula verified:

<a href="www.google.com?ProgID=CAST([@field:Customer] AS varchar)&item=CAST([@field:DateFrom] AS varchar)&num=1&erid=CAST([@field:Customer] AS varchar)">Add item</a>'

You can try the following:


WHEN [@calcfield:1] >= [@field:count1]  THEN 'Complete'
WHEN [@calcfield:11] >= [@field:count1] THEN 'Waiting approval'
ELSE '<a href="https://www.picklework.com/employee/program-progress/?ProgID=CAST([@field:progid#] AS varchar)&item=CAST([@field:mod1#] AS varchar)&num=1&erid=CAST([@field:enrolid#] AS varchar)">Add item</a>'

After you are done with the formula you can follow the steps from the article below on how to render HTML inside the Calculated field: 
One way to do this is to add an HTML Block, inside the HTML Block add your calculated field and set it as HTML. You could then use some CSS to hide the calculated field. In the forum post below all the steps are explained. 


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.

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.

  • Create New...