cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sumadhuram456
Regular Visitor

To read the choice field value of Finance and operations virtual entity

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

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @sumadhuram456 

 

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!

View solution in original post

7 REPLIES 7
hardikv
Memorable Member
Memorable Member

Hi @sumadhuram456 

 

Can you please share screenshots of your field in Portal and also screenshots of Inspect Element of that fields?

 

 

sumadhuram456
Regular Visitor

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.

 

sumadhuram456_0-1633194404615.png

 

sumadhuram456_2-1633194861632.png

 

 

Hi @sumadhuram456 

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!

Hi @hardikv 

 

This field exists in fetchxml

 

sumadhuram456_0-1633231387267.png

 

Hi @sumadhuram456 

 

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!

Thank you @hardikv . It works 😊

Hi @sumadhuram456 

 

Glad to hear that your issue has been resolved.

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Top Solution Authors
Users online (1,282)