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
Super User
Super User

@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
Super User
Super User

@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)

 

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

@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?

@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

 

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) 

 

@IdreesAnwar Glad to help!

Helpful resources

Announcements
Microsoft 365 Conference – December 6-8, 2022

Microsoft 365 Conference – December 6-8, 2022

Join us in Las Vegas to experience community, incredible learning opportunities, and connections that will help grow skills, know-how, and more.

Difinity Conference 2022

Difinity Conference 2022

Register today for two amazing days of learning, featuring intensive learning sessions across multiple tracks, led by engaging and dynamic experts.

European SharePoint Conference

European SharePoint Conference

The European SharePoint Conference returns live and in-person November 28-December 1 with 4 Microsoft Keynotes, 9 Tutorials, and 120 Sessions.

Power Apps Ideas

Changes to Ideas Coming

We are excited to announce a new way to share your ideas for Power Apps!

Top Solution Authors
Top Kudoed Authors
Users online (2,857)