cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
arseny_sandaar
Regular Visitor

Default Value issue

Dear All, 

I couldn't understand why I am having the issues with the default values to insert for my entries.

 

I have 3 pages:

  1. Gallery page - with the list of entries, by clicking an entry you can go to the next page
  2. The entry detail page - where we see different DataCards (some of them are already filled, some are emty)
  3. Entry's edit page - where you can edit DataCards (mine are all allowed-value drop-down cards)

The problem is following:

  1. I edit one entry and successfully save it (Page 3), then I return to the Gallery page (Page 1) through Page 2 (I have return button)
  2. Then I go to another entry from Page 1 through Page 2 to Page 3 to edit the selected entry. Here in emtpy DataCards I see the same values from the previous entry suggested as default values. But I don't want them to be suggested, because sometimes I don't have data - so I need to leave them empty. My default should be blank, but instead it takes data as default from previous entry. Instead saving as it was suggested I need to refill all the DataCards from drop-down menu for each DataCard which takes time OR I need to cancel editing, go back and then return again to edit page - then it will be empty because the last appearance of Page 3 had no fields filled. Interesting fact that some DataCards somehow do not suggest default value from previous entry, though they are technically the same.
5 REPLIES 5
StalinPonnusamy
Community Champion
Community Champion

Hi @arseny_sandaar 

 

  • Please make sure the default property is to
Parent.Default
  • Make sure your edit form Item property is
Gallery1.Selected
  • From Page 2 to Page 3, the command should be 
EditForm(EditFormName);Navigate(EditScreenName, ScreenTransition.None)


Thanks,
Stalin - Learn To Illuminate

 

StalinPonnusamy
Community Champion
Community Champion

Hi @arseny_sandaar 


Please let us know if anything needs on your post. We can help with this.

Please mark the post as Solved If I have answered your question.
Please give it a Thumbs Up if you find the suggestion helpful

Thanks,
Stalin - Learn To Illuminate

arseny_sandaar
Regular Visitor

Hello,

thank you for the comment though it didn't help to solve the issue. 

Everything was already as you described in the comment. 

 

The problem is following:

  1. I edit one entry and successfully save it (Page 3), then I return to the Gallery page (Page 1) through Page 2 (I have return button)
  2. Then I go to another entry from Page 1 through Page 2 to Page 3 to edit the selected entry. Here in emtpy DataCards I see the same values from the previous entry suggested as default values. But I don't want them to be suggested, because sometimes I don't have data - so I need to leave them empty. My default should be blank, but instead it takes data as default from previous entry. Instead saving as it was suggested I need to refill all the DataCards from drop-down menu for each DataCard which takes time OR I need to cancel editing, go back and then return again to edit page - then it will be empty because the last appearance of Page 3 had no fields filled. Interesting fact that some DataCards somehow do not suggest default value from previous entry, though they are technically the same.
StalinPonnusamy
Community Champion
Community Champion

Hi @arseny_sandaar 

 

We can use the Global variable instead of referencing the gallery.

 

Set the OnSelect property of Gallery to

Set(SelectedRecord, BrowseGallery1.Selected);Navigate(DetailScreen1, ScreenTransition.None)

 

Set the Item property of the Form to

SelectedRecord

 

Set the OnSuccess Property of Editform to

Set(SelectedRecord, Self.LastSubmit)

 

The above OnSuccess property will work only when you use SUbmitForm(FormName). If you use the Patch command then we need to set the saved record like below

Set(
    SelectedRecord,
    Patch(....)
)

 


Thanks,
Stalin - Learn To Illuminate

StalinPonnusamy
Community Champion
Community Champion

Hi @arseny_sandaar 


Please let us know if anything needs on your post. We can help with this.

Please mark the post as Solved If I have answered your question.
Please give it a Thumbs Up if you find the suggestion helpful

Thanks,
Stalin - Learn To Illuminate

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (1,655)