Hello All,
I have a screen with gallery connected to 'Status Update' Data source. (Screenshot 1). 'Status Update' is an entity in Dynamics 365 organization.
On click of (>) arrow button i want to show the record details. I have tried it through D365 connector and i am able to show the selected record details on other screen. However the lookup fields in the details screen is a drop-down field.
We have requirement to convert it to proper lookup field. So we have replaced a details screen with custom screen where we have created our own fields and populating the data of selected record.
On click of (>), we are executing below command to store all data in editStatusUpdate collection.
ClearCollect(editStatusUpdate,{statusupdate :Gallery4.Selected});
We are able to populate only string and date field but we are not able to populate lookup field. The 'editstatusUpdate' collection wont have the lookup details. (screenshot 2)
Please suggest the way to populate the lookup details in the text fields.
Thanks in advance.
Jayesh.
Solved! Go to Solution.
Hi @ARM
Of course, just put Set(Var,ThisItem.LookUpFieldName.RelatedEntityFieldName ) to OnSelect of right arrow and set Var to Default property of textinput box. but I think, it would be the same with my workaround above.
What I want to remind is the error is probably caused by the connection failure of related entity if my understanding to your issue is right, so you have to refresh the lookup field related enttity in the left Data Source bar (or delete and re-add it manually), instead of using Refresh function.
Best regards,
Sik
Hi @jchopde,
If you want to display the lookup value in text control, the Default property of textinput box should be set as below:
ThisItem.LookUpFieldName.RelatedEntityFieldName /* e.g. ThisItem.'Primary Contact'. 'Full Name' */
If your text control show nothing and have no formula error, please try to refresh the Related Entity in the left data source bar. Although the related entity will be added automatically once we work with lookup field, but it seem to be a little connection bug, we have to manually refresh it, and then the lookup value would be seen.
Primary Contacts is lookup field, display in text control
Hope this helps,
Best regards,
Sik
If my post is helpful for you, please click on “Accept as Solution” to help other members find it more quickly.
Hello Sik,
Thanks for your response.
I have tried it but its failed to get the account name. I am creating a powerapp for mobile so when we click on '>' arrow button of the record in gallery, the screen navigates to 'details' screen. I have tried refreshing the gallery items and then tried to navigate to 'Details' screen but no luck.
Is there any way to set the variable with the lookup id and name itself on the gallery screen and then we can use that variable in the 'Details' screen?
Best Regards,
Jayesh
Hi @ARM
Of course, just put Set(Var,ThisItem.LookUpFieldName.RelatedEntityFieldName ) to OnSelect of right arrow and set Var to Default property of textinput box. but I think, it would be the same with my workaround above.
What I want to remind is the error is probably caused by the connection failure of related entity if my understanding to your issue is right, so you have to refresh the lookup field related enttity in the left Data Source bar (or delete and re-add it manually), instead of using Refresh function.
Best regards,
Sik
Thank you Sik,
Refreshing Datasource didn't helped me. However setting the variable itself on the gallery screen and using the same variable to the default property of text box resolves the issue.