cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
ocdc2008
Advocate II
Advocate II

Inconsistent behaviour between Edit and Play mode

Hello,

 

I have been troubleshooting this problem all day and cannot seem to find a solution. I'm finding inconsistent behavior when I am in the PowerApps Studio editing the application vs when I am in Play mode. Specifically, when I'm looking at a NewForm Custom Data Card dropdown menu.

 

This has worked for months and just started acting up today. I reverted back to a prior version from a month ago and it still doesn't work.

 

In the attachments, "Picture 1" is a view of the app from Edit Mode. Some things to note:

 

1) The dropdown menu labeled "Account" contains the collection called "account" and displays the field "Description". The ID of each account is accessible from DataCardValue212.Selected.ID.

2) You'll find the captured ID inside of the Account textbox AND in a label placed in the header of the screen for troubleshooting purposes.

3) There is no problem when trying to capture the ID from the dropdown menu in Edit mode.

 

In the attachments, "Picture 2" is a view of the app from Play Mode. Some things to note:

 

1) The screen is accessed using the exact same user, variables, and screen navigation path (same state).

2) Notice that the two places where the ID is supposed to pull in. Both are blank.

 

When the form is submitted in Edit mode, it works fine. When the form is submitted in Play mode, the AccountID will not fill into the form and there is an error stating it won't work.

 

WHY IS POWERAPPS LIKE THIS?

 
2 ACCEPTED SOLUTIONS

Accepted Solutions

I spoke with @rsaikrishna on this issue.

 

It turns out that when you create data cards within forms using the built in automatic card builder tool, sometimes the controls inside of the card can have problems.

 

The solution to the problem is to use the auto data card builder to create the card and controls, then to manually add a control inside of the card and set the visible property of the original control to false.

 

 

View solution in original post

@ocdc2008 

 

Within the card, added a drop down control and Items set to the collection.

In the Card properties, Update set to the value selected in the drop down.

 

AccountID column is a look up column in the SQL table.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

View solution in original post

5 REPLIES 5
rsaikrishna
Super User
Super User

@ocdc2008 

 

In the View mode or Play mode, you need to refer the value in the data source for Default value.

 

In the Default field, you should place

ThisItem.AccountID

 

This will bring value from the field in your data source.

 

Try it and let me know if this does not work.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

 

 

@rsaikrishna 

 

That doesn't work because this is a NewForm, not an EditForm.

 

Besides even if it were an EditForm and the user decided to select a different Account from the dropdown menu, I need the default to be overwritten. This is why the Default value was pointing at the dropdown menu's value rather than some existing item.

@rsaikrishna 

 

I've done some further tests. I completely rebuilt the AccountID data card and tried to leave as many fields unchanged as possible.

 

See attached screenshot.

 

The only field I changed was the AllowedValues field so that I could choose from my list of accounts. Running the App in Edit Mode allows me to successfully submit the form.

 

Running in Play mode stops me and says that the field is not filled in correctly.

 

 

I spoke with @rsaikrishna on this issue.

 

It turns out that when you create data cards within forms using the built in automatic card builder tool, sometimes the controls inside of the card can have problems.

 

The solution to the problem is to use the auto data card builder to create the card and controls, then to manually add a control inside of the card and set the visible property of the original control to false.

 

 

@ocdc2008 

 

Within the card, added a drop down control and Items set to the collection.

In the Card properties, Update set to the value selected in the drop down.

 

AccountID column is a look up column in the SQL table.

 

Regards

Krishna Rachakonda

If this reply helped you to solve the issue, please mark the post as Accepted SolutionMarking this post as Accepted Solution, will help many other users to use this post to solve same or similar issue without re-posting the issue in the group. Saves a lot of time for everyone.

Helpful resources

Announcements
PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (3,049)