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 Apps / Show related field for...
Power Apps
Suggested Answer

Show related field for editable grid selection

(1) ShareShare
ReportReport
Posted on by 938
I understand an editable grid is on a form but is there any way to show an additional value based on the record selected in the editable grid? So in this example I'd want the Invoice Amount and Ledger total field to update based on the record I select in the grid
 
I have the same question (0)
  • Suggested answer
    Valantis Profile Picture
    6,735 on at

    Out of the box, no form fields like Invoice Amount / Ledger Total are bound to the main form record, so they won’t automatically change when you click a row in an editable subgrid.

    To achieve what you want, you need a small customization using the grid’s OnRecordSelect event (available for editable grids/Power Apps grid): when a row is selected, run JavaScript to read the selected record ID, retrieve the values (e.g., via Xrm.WebApi.retrieveRecord), and then display them (ideally in a web resource/PCF/side pane). Avoid writing them into normal bound fields unless you really intend to update the main record.

     

    Grid OnRecordSelect event: https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/events/grid-onrecordselect

     
     

    Xrm.WebApi.retrieveRecord: https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/xrm-webapi/retrieverecord

     

    let me know if that answers your question.

     

    Best regards,
    Valantis

  • Valantis Profile Picture
    6,735 on at

    Hi @ctedesco3307,

    Just wanted to check in and see if everything is working now. If you still need any help, feel free to let me know.

    Also, if the issue is resolved, it would be great if you could mark the answer as solved so others with the same question can find it easily.

     

    Thanks and have a great day!

     
  • Suggested answer
    DP_Prabh Profile Picture
    381 on at

    Yes. Using JS with the Editable Grid OnRecordSelect event and Xrm.WebApi.retrieveRecord is a supported.

    Relevant Microsoft docs:

    1. Editable Grid Events (OnRecordSelect) (https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/events/grid-onrecordselect)
    2. Xrm.WebApi.retrieveRecord (Client API) (https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/xrm-webapi/retrieverecord)
    3. formContext.getAttribute().setValue() (https://learn.microsoft.com/en-us/power-apps/developer/model-driven-apps/clientapi/reference/attributes/setvalue)

    I hope this works for you!

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

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Valantis Profile Picture

Valantis 424

#2
WarrenBelz Profile Picture

WarrenBelz 355 Most Valuable Professional

#3
11manish Profile Picture

11manish 290

Last 30 days Overall leaderboard