cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Community Champion
Community Champion

Re: Save calculation result into data source with Patch command

Hi @AnthonyRegnier ,

Timezone has me offline very shortly (11pm here) - I will tackle this with morning brain.

Highlighted
Community Champion
Community Champion

Re: Save calculation result into data source with Patch command

OK @AnthonyRegnier ,

This is all about refreshing values when required and should be easily solvable.

Your latest screenshot now explains issue 1. This is set on a Variable and naturally if you do not change this variable, you will continue to get its value shown - so two choices I see. Reset it on save

UpdateContext({Quantity:0})

OR Hide it on save - use Variable for Visible of control.

  1. At Save set to false
  2. At OnChange of stock box set to true

Second point as mentioned will happen with your sort order, unless you do something like setting an update time/date in the item and having an optional sort on this (descending) which would show the new item on top.

Third one put the card back and hide it

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Highlighted
Helper IV
Helper IV

Re: Save calculation result into data source with Patch command

Hi @WarrenBelz  !

 

Thank you, I have set the Quantity variable to be blank when I hit save and it works :).

 

For the second point I don't really get it. When you create a basic app from a SP list, the gallery is Alphabetically sorted.

When you enter a product detail and change the name... You're not going to another screen... I've worked around it by creating a new screen like (Update successful) and navigate into it but not really what I wanted....

 

But anyway, I've marked it as resolved so thank you very much for your help!!

Anthony

Highlighted
Community Champion
Community Champion

Re: Save calculation result into data source with Patch command

Hi @AnthonyRegnier ,

The second point was a very "clunky" workaround suggestion. You can sort however you want in the Items property of the gallery as you would know. Now I have thought it through, I probably have a better one. You could set a temporary variable when you save and if this variable is true, sort the gallery by Modified, Descending. This would put the last modified item on top. You could reset the Variable at screen OnVisible or at any other point you want to go back to your normal sort.

If you send me the Items property of the gallery, I can give you the code.

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

Check out these cool Power Apps & vote on your favorite!

secondImage

Community Highlights

Check out whats happening in Power Apps

secondImage

Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (13,972)