Hi All,
I have Finance and operations virtual entity from which I need to check for a field value and do some validation in portal.
In F&O, the field is a checkbox field. So this becomes like a choice field in Dataverse table with choices NO and YES.
While browsing the virtual table record in SQL 4 CDS, I can see the field holds integer values like, for YES - 200000001 and for NO - 200000000.
But I cannot compare the same field value with these integer values in portal. I get empty/blank values from the field.
I am able to do update the same field with these integer values using portal webapi. This works.
Only reading the choice field value is the problem.
Any help? Thank in-advance
Solved! Go to Solution.
In choice field, you have to use value and label in liquid template.
{{ claimline.mserp_validforresubmit.value }}
{{ claimline.mserp_validforresubmit.label }}
claimline.mserp_validforresubmit.value --> 200000001
claimline.mserp_validforresubmit.label --> YES
--------------------------
If you like this post, give a Thumbs up. Where it solved your query, Mark as a Solution so it can help other people!
Can you please share screenshots of your field in Portal and also screenshots of Inspect Element of that fields?
Hi @hardikv
I am using a custom web template and this field is not displayed on the page.
I get the record from fetch xml, and reading the field value to evaluate a condition.
Below, claimline.mserp_validforresubmit is the NoYes choice field of the virtual entity.
variable 'allowEdit' always evaluates to false irrespective of the field value
I tried with 200000001, "Yes", true, 1. Nothing works.
I tried to display the field value on the page. Its value is never shown.
Please check that your field is available in your fetchxml.
<attribute name="mserp_validforresubmit" />
--------------------------
If you like this post, give a Thumbs up. Where it solved your query, Mark as a Solution so it can help other people!
In choice field, you have to use value and label in liquid template.
{{ claimline.mserp_validforresubmit.value }}
{{ claimline.mserp_validforresubmit.label }}
claimline.mserp_validforresubmit.value --> 200000001
claimline.mserp_validforresubmit.label --> YES
--------------------------
If you like this post, give a Thumbs up. Where it solved your query, Mark as a Solution so it can help other people!