Jump to content

Js To Display Different Href Based On Authfield


Recommended Posts

I am trying to use an HTML block to insert script in a report to show a different hyperlink based on the condition of a field in the authorization....I tried to write and looking at it hopefully someone can help with what I am trying to accomplish:

 

<script>

if("[@field:PrioiritiesComplete^]" == "No") {

window.location = "<a href="https://c0cmr504.caspio.com/dp.asp?AppKey=ExampleA?PersonID=[@authfield:PersonID#]&Email=[@authfield:Email]">Link To Complete</a>

";

} else {

   ("[@authfield:EngagementSigned]" == "Yes")

window.location = "<a href=" https://c0cmr504.caspio.com/dp.asp?AppKey=ExampleB?PersonID=[@authfield:PersonID#]&Email=[@authfield:Email]">Link To Review</a>

";

 

}

</script>

Link to comment
Share on other sites

We figured this out so I will share.....

 

<script>

if ("[@field:fieldname^]"=="No"){

document.getElementById('dynLink').innerHTML="<a href='https://c0cmr504.caspio.com/dp.asp?AppKey=123456789101112?PersonID=[@authfield:PersonID#]'>Link To Complete</a>  ";

} else {

document.getElementById('dynLink').innerHTML="<a href='https://c0cmr504.caspio.com/dp.asp?AppKey=987654321121110?PersonID=[@authfield:PersonID#]'>Link To Review</a>  ";

}

</script>

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
Reply to this topic...

×   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...