You are viewing limited content. For full access, please sign in.

Question

Question

How to convert a Field value from lookup to custome html

asked on February 28, 2020 Show version history

Hello,

 

I ve the below form where the Capex Request Form being lookup from SQL DB. I want to add a custom HTML with the Capex Request Form value so that when user click on the link it open the weblink highlighted in  red.

Arvind

0 0

Replies

replied on February 28, 2020

Hi Arvind

There are two scenarios where this can work.

Scenario 1

If Workflow is passing the Capex Request Form value back to the Form through a Set Business Process, then you can simple add the token to the URL field in the Custom HTML which will create a hyperlink in your form

0 0
replied on February 28, 2020 Show version history

Scenario 2

In the case where the Capex Request Field is being populated by a Lookup or a Calculation after the form is opened, then you need to use Javascript to append the value to the HTML Field.

Create the HTML Field 

You will need some Javascript such as this to append the Field to Custom HTML Field when the Capex Request Form value changes. In this example #q2 is the Capex Field, #q3 is the Custom Html Field.

My coding skills are not that strong but this will point you in the right direction

$(document).ready(function() {
$("#q2").change(function(){
   $('.frame1').remove();
   var CapexURL = $("#q2 input").val();
              $('#q3').append("<iframe src='"+CapexURL+"' width=100% height=800px name='frame1' id='frame1'class='frame1'></iframe>");
   });

})

0 0
replied on March 1, 2020

Hi Steve,

Many thanks for your help, the iframe working fine.

Arvind

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.