web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Pages / To read the choice fie...
Power Pages
Answered

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

(0) ShareShare
ReportReport
Posted on by 30

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

 

Categories:
I have the same question (0)
  • H V Profile Picture
    1,510 on at

    Hi @sumadhuram456 

     

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

     

     

  • Ajay kumar Pollamsetty Profile Picture
    30 on at

    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

     

     

  • H V Profile Picture
    1,510 on at

    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!

  • Ajay kumar Pollamsetty Profile Picture
    30 on at

    Hi @hardikv 

     

    This field exists in fetchxml

     

    sumadhuram456_0-1633231387267.png

     

  • Verified answer
    H V Profile Picture
    1,510 on at

    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!

  • Ajay kumar Pollamsetty Profile Picture
    30 on at

    Thank you @hardikv . It works 😊

  • H V Profile Picture
    1,510 on at

    Hi @sumadhuram456 

     

    Glad to hear that your issue has been resolved.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Pages

#1
rezarizvii Profile Picture

rezarizvii 55

#2
11manish Profile Picture

11manish 48

#3
Valantis Profile Picture

Valantis 46

Last 30 days Overall leaderboard