Hello,
I am selecting a record from and entity list to view in a form on another page.
I'd like to use the record ID that is seen in the URL to fetch the record so that I can get the ID of a related record and then fetch that.
Is the ID stored as a variable on the page?
Thanks
Thank you,
Table A has Notes attached. Table B is has records related to Table A and is displayed on the entity list.
I'll select the Table B record and display details from Table B in the Form and details from Table A in a subgrid. I need to fetch the ID of Table A to Fetch the Notes associated to the Table A record to display them in a gallery.
Sorry for the confusion, hopefully that makes sense.
Hi, yeah your logic should work then, I see no issues in general.
Just a bit confused about the relationships there
You have an Entity List for Table A, then, do you have the notes associated with that record, or first you have another list/subgrid for Table B and then the link to notes?
If the former, just apply your code (probably in a Web Template) and display the pictures.
If the latter, you might have to first drill down into the Table B record/web page, and then get the pictures.
Thank you very much Oliver.
I'm new to portals, thanks for your help!
I have an entity list that has 'view details' against each record. This opens a Form on a different page that show the details of the selected record.
The record show in the form is related to another table record that has notes attached. The notes are pictures.
My plan was to Fetch the selected record ID to obtain the related record ID. Then Fetch the note IDs related to that ID (the related record).
I was then going to display these in a gallery using Portal URL/_entity/annotation/Note ID as the URLs like in Ritika Agarwal's video 'Working with Data in Power Apps Portals at 39:00 mins: www.youtube.com/watch?v=Ka3yfy3k3ew&t=325s
The end state is a form with a gallery below showing associated pictures. I don't know if this will work, hopefully it does. Any advice would be most welcome.
Hi, if you are opening a Web Page with Entity Form you have plenty of options to get the main record id:
var recordId = new URLSearchParams(window.location.search).get("id")
var recordId = $("#EntityFormControl_EntityFormView_EntityID").val()
{{ request.params.id }}
I am not sure what you are trying to achieve, but if you have the parent record and want to show a list of related records, all you need is to add a sub-grid in your form, you don't need any code for that.
If you want to fetch details of a lookup related record, you can add a Quick View Form in your main Form, again no need for code.
Can you explain a bit more what you need?
Lucas001
60
Super User 2025 Season 2
Fubar
55
Super User 2025 Season 2
surya narayanan
35