cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
IdreesAnwar
Frequent Visitor

Some fields within edit form are blank when they have data in them

I'm currently creating a canvas app with a dataverse database. I have the 2 following tables as part of the database:

 

- Opportunity 

- Business Area

 

The opportunity table has a lookup field to the Business Area table which forms a 1-to-Many relationship. 

 

I currently have a gallery which contains all Opportunities related to the currently selected Business Area. The gallery is populated using the following formula on it's Items property:

 

selectedBusinessArea.Opportunities

 

the gallery looks like this:

Related Opportunities Gallery.PNG

When I click on an item in the related list, a page containing an edit form for opportunities is shown, but the edit form only contains data for the Name and Description fields. The rest of the fields are blank. Here's a screenshot.

 

Opportunity details edit form, only the Name and description fields have any dataOpportunity details edit form, only the Name and description fields have any data

 

The edit form is populated using the following formula on it's items field.

 

If(newOpportunity, Defaults(Opportunities), selectedOpportunity)

 

in the formula above:

the newOpportunity variable is set to false when an item in the related Opportunities gallery is selected and the selectedOpportunity is set to the selected Item in the gallery when an item in the gallery is selected.

 

Does anyone have any idea why the Opportunity edit form is only partially loading the data in the edit form fields when trying to access it through the Opportunities related list on Business Areas.

 

A little Extra information:

 

The same issue doesn't occur when the data source of the gallery is set to the Opportunities table without any filters. Here is the result when using just the Opportunities table as the data source for the gallery.

 

Opportunity Details form without missing data.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
CNT
Community Champion
Community Champion

@IdreesAnwar It could be due to the Explicit Column Selection Preview feature. You try turning it Off , although I would not recommend it as this will GA soon.

An Alternative would be to do an explicit LookUp rather than using the dot notation. Try this in the Items property (replace Key with the respective column names):

LookUp(Opportunities, Key=selectedBusinessArea.Key)

 

View solution in original post

6 REPLIES 6
CNT
Community Champion
Community Champion

@IdreesAnwar It could be due to the Explicit Column Selection Preview feature. You try turning it Off , although I would not recommend it as this will GA soon.

An Alternative would be to do an explicit LookUp rather than using the dot notation. Try this in the Items property (replace Key with the respective column names):

LookUp(Opportunities, Key=selectedBusinessArea.Key)

 

View solution in original post

IdreesAnwar
Frequent Visitor

@CNT Thanks for the solution, I couldn't find the Explicit Column selection preview feature. But i did try the lookup approach. The lookup approach did solve the issue, but as it only returns the one record the related list didn't contain all of the related opportunities. So, what i did instead was just use the filter function.

 

Filter(Opportunities, 'Business Area'.'Business Area' = selectedBusinessArea.'Business Area')

 

Thanks for the help

IdreesAnwar
Frequent Visitor

@CNT I've actually just tested the functionality again, it seems to have reverted back to the issue I was having before. This is very strange, The filter approach was working correctly just a couple of minutes ago and now I have the same issue again. I haven't changed anything since I fixed it?

CNT
Community Champion
Community Champion

@IdreesAnwar Filter returns a Table but you need only one record in the Item Property of the EditForm. That's why I told to use LookUp.

Also, you can find the Explicit Column Selection Preview feature here,

CNT_0-1622537955969.png

 

IdreesAnwar
Frequent Visitor

Oh right, i understand it now. So, just to detail the solution for anyone looking at this at a later date:

 

I have used the following filter on the Items property of the related opportunities gallery:

 

Filter(Opportunities, 'Business Area'.'Business Area' = selectedBusinessArea.'Business Area')

 

Then, for the OnSelected() event for the gallery i have used the following Lookup to get the full set of data for the opportunity that has been selected,

 

Set(selectedOpportunity, LookUp(Opportunities, Opportunity = ThisItem.Opportunity));

 

this now seems to be working. Thanks for the help @CNT.

 

ps: I've had a look in the upcoming features section but I the explicit column selection feature isn't in there. (not sure why) 

 

CNT
Community Champion
Community Champion

@IdreesAnwar Glad to help!

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Users online (1,823)