cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper V
Helper V

Edit Screen not showing data from Detail Screen

I built a basic app using the wizard that has three basic screens:

 

Gallery Screen

Detail Screen

Edit Screen

 

For some reason when you are on the detail screen and click the pencil to edit that screen, the edit screen does not retain the data from the detail screen. You have to fill out the form as though you're doing it from scratch. How do you retain the information from the detail screen?

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Edit Screen not showing data from Detail Screen

@TesDA 

The message is correct.  With using just the lookup like that you will be returning a string value.  Your combobox is based on a table of records (Remember, the Distinct function will return a table of single column results records).

You have got to put the construct of the record in the default as I showed in the last post.

This should be your entire Default Property:

{Result: LookUp(vps_ProjLevel3S, ProjectID = ThisItem.ProjectID, ProjectIDName)}

This will return a single column record with a Result column and a value based on the lookup.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

View solution in original post

13 REPLIES 13
Highlighted
Super User III
Super User III

Re: Edit Screen not showing data from Detail Screen

Select the form and check on the DefaultMode if it is new, change it to View or edit
Highlighted
Helper V
Helper V

Re: Edit Screen not showing data from Detail Screen

Its already set to edit

Highlighted
Super User III
Super User III

Re: Edit Screen not showing data from Detail Screen

@TesDA 

Have a look at the Item property of the Edit Form on the Edit Screen.  It should reference the Gallery from the Browse Screen.

You can also look at the Item property of the DetailForm on the Detail Screen - it should be the same as the EditForm.

Most likely, if this is a default app, it should be BrowseGallery1.Selected

 

I hope this helps you.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Helper V
Helper V

Re: Edit Screen not showing data from Detail Screen

@RandyHayes 

 

So close! Its populating everything except a combobox (ProjectID_DataCard3) which is coming from the ProjectID column. Any thoughts on this last one?

 

 

Highlighted
Super User III
Super User III

Re: Edit Screen not showing data from Detail Screen

@TesDA 

So that needs a little more looking...

What kind of column is ProjectID?  What is the formula on the Default property of the Datacard for that column on the EditForm?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Helper V
Helper V

Re: Edit Screen not showing data from Detail Screen

@RandyHayes  - Let me know if you need any other information

ProjectID is a text/ string column from the common data service.

Combobox:

Onselect = false

onchange = false

display fields = ["Result"]

searchfields = ["Result"]

Items = Sort(Distinct(vps_ProjLevel3S, ProjectIDName), Result)

selectmultiple = false

default = (blank)

defaultselecteditems = (blank)

reset = false

issearchable = true

 

Card - ProjectID_DataCard3

required = true

default = thisitem.projectid

update = combobox3.selected.result

allowedvalues = DataSourceInfo([@ProjEmergencies], DataSourceInfo.AllowedValues, "crf02_projectid")

Highlighted
Super User III
Super User III

Re: Edit Screen not showing data from Detail Screen

@TesDA 

Let's first try to change the default on the ComboBox to Parent.Default

 

No joy with that?  Then I need to know the correlation of the vps_ProjLevel3S source's ProjectIDName to projectid

What we are looking for is how to cross reference the id to a name by looking it up.

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Highlighted
Helper V
Helper V

Re: Edit Screen not showing data from Detail Screen

@RandyHayes Unfortunately no luck.  Are you at the Washington DC Power Platform World Tour? If so, I could just show you.

 

I have an entity in CDS that is really just ProjectID, ProjectName, ProjectIDName (in addition to the fields that CDS adds)

Project ID might look like 000XXX.00.001

Project Name might look like Manpower Study

ProjectIDName might look like 000XXX.00.001 - Manpower Study

Highlighted
Super User III
Super User III

Re: Edit Screen not showing data from Detail Screen

@TesDA 

I SOOO Wish that I was at the conference this week.  It's only about 30 minutes away, but unfortunately I had prior commitments this week.

 

Anyway, so the trick is that you need to have the Default item of your combobox be the record you want to default to.

So, for default, we can do something like this:

{Result: Lookup(vps_ProjLevel3S, ProjectID=ThisItem.projectid, ProjectIDName)}

This will return from the Lookup a record that matches the projectid of the current item (ThisItem).  

In order for a default to work on a combobox or dropdown (or any other control really), we need to match the default value to the items property signature.

In your Item property you have a Distinct function in there.  Distinct returns a single column table of distinct results - ironically the column is named "Result".

So, that mean that your Items are a table of records, each record with a single column called result.

Why do we care? Because now, in the Default property we are creating a record with a single column and a value.

If you look at the formula above, you'll see that it is a definition for a single column record with a column named Result.  We are then doing a Lookup on the actual data source to cross reference the projectid and then get the ProjectIDName - which is what your combobox is based on. 

This should match and thus have a default record for the control.

 

See if that all makes sense and helps.  And PLEASE enjoy the conference...**bleep**, I so wish I was there!!!

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (6,854)