cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Kudo Kingpin
Kudo Kingpin

Update Context

Hi,

 

Could someone please point me in the right way?

 

Picture1.png

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User III
Super User III

Re: Update Context

@sajarac 

Glad to help.

 

That formula I gave you should do what you ask.  It will only show them as visible IF the LetsEditID is equal to the current row ID. 

They would not be visible any other time.

 

Make sure you are putting an UpdateContext({LetsEditID:0}) in your Save and Trash OnSelect Actions as well so that the row will go back to normal and the icons would not be visible. 

 

_____________________________________________________________________________________
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

10 REPLIES 10
Highlighted
Super User III
Super User III

Re: Update Context

@sajarac 

You will not be able to get what you want with a variable.  It is not unique to the row.

 

If you ONLY want to be able to edit one row at a time, then change the OnSelect of your edit button to the following:

UpdateContext({LetsEdit: ThisItem.ID}) (or some unique way to identify that row.

 

Then set the DisplayMode property of your TextInput to the following:

If(ThisItem.ID = LetsEdit, Edit, View)

 

If you need the ability to edit multiple lines at the same time, let me know, there is a different solution to that.

 

I hope this is helpful for 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
Kudo Kingpin
Kudo Kingpin

Re: Update Context

Capture.PNG

 

Humm, it seems like my app is not cooperating.

Highlighted
Super User III
Super User III

Re: Update Context

@sajarac 

Do you have an ID column in your datasource?  That was why I mentioned in my reply "or some unique way to identify that row"

If you do not have an ID column, do you have any unique identification of that row?

_____________________________________________________________________________________
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
Kudo Kingpin
Kudo Kingpin

Re: Update Context

Yes, I have the SPL Column "ID" that is why is weird, I don't know why is not picking the formula.

 

 

Highlighted
Kudo Kingpin
Kudo Kingpin

Re: Update Context

But I am OK to show all of the EDIT buttons in every single row. I just want to hide the empty text input fields

Highlighted
Super User III
Super User III

Re: Update Context

@sajarac 

First, if you have an ID then the error you were seeing is because you are still referencing the LetsEdit as boolean in places in your app.  You would need to change them for the error to go away.

To make that a non-issue, just change the name of "LetsEdit" in the formulas I gave you before to "LetsEditID". That would take care of the error.

Any yes, with this you are still getting the edit buttons on every row...that is exactly what you want and there is no suggestion of removing them.

 

But, If your issue is with the empty ones, then please explain what you mean by the empty ones.  In your original you referenced a LblQuotePrice control.  Are you saying if that is empty (i.e. 0) or if the textbox itself is empy?

_____________________________________________________________________________________
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
Kudo Kingpin
Kudo Kingpin

Re: Update Context

Thank you, I have partially working the formula.

 

But I can't get to hide the SAVE and TRASH icons

 

Picture2.png

Highlighted
Super User III
Super User III

Re: Update Context

@sajarac 

Set the visible properties of the save and trash icons to this:

ThisItem.ID = LetsEditID

 

That will evaluate to true only when the ID's are equal and thus will be visible only on the row being edited.

_____________________________________________________________________________________
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
Kudo Kingpin
Kudo Kingpin

Re: Update Context

OH Boy, thank you thank you thank. One last thing and sorry to bother you.

 

If I would like to hide the SAVE and TRASH icons and only be visible when the user click in the EDIT icon, what is the formula?

 

And thanks again for your time

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 (4,566)