I need to pass this in UiPath form and display as output.
I have tried using datatable component in form but its not displaying with colors
So I have converted as html table and tried to pass it.
But struck while passing it
Pls suggest the possible approaches
Use UiPath Form’s HTML Element control and bind your HTML table string to its Default Value.
Apply all colours using inline CSS like .
Set Sanitize HTML to False so that your styles render correctly as per UiPath documentation.
Create the HTML table string in UiPath using Assign activity or StringBuilder then add an HTML Element in the Form Designer. Then go to Field Key → set it as, e.g., HtmlTable. When invoking the form, pass the HTML string as input data: New Dictionary(Of String, Object) From { {"HtmlTable", htmlTableString} }
Now use an Assign activity before the Show Form and pass this formData = New Dictionary(Of String, Object) From { {"HtmlTable", Htmltext} }
Here HtmlTable must match the Field Key you set in the form’s HTML Element and Htmltext is your variable containing the HTML table string also formData is your dictionary variable of type Dictionary<String, Object>. Now in the Show Form activity go to Input Data and pass formData as the value.
inside the form, open the HTML Element properties set Default Value to {{HtmlTable}}.
You need to declare {{HtmlTable}} inside the Content field of the HTML Element under the Display tab, but before that, make sure the Field Key of the HTML Element is set to HtmlTable without curly braces.
Hi @bhavesh.choubey,
I have tried the above suggested method but couldnot populate my html in form
Can you pls look into my html file and provide solution test.html (3.9 KB) test.html (3.9 KB)