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

Edit Form takes value based on last location

I'm a bit stuck on a problem,

So I have an Edit Form, that gets the ID from the Gallery and puts up an Edit Form

I also have a New Form, which when generated goes to an Edit Form 

How do I have the Items in my Edit Form - to be a lookup, either on the first gallery if that was last click, or from the lookup of the new form

Hope this makes sense?

Please and thank you

Jese

1 ACCEPTED SOLUTION

Accepted Solutions
v-xida-msft
Community Support
Community Support

Hi @jesenavaranjan,

Could you please share a bit more about your scenario?

Do you want to populate your Edit form from the Gallery or the New Form?

I have made a test on my side, please take a try with the following workaround:

Within your Gallery screen, set the OnSelect property of the Gallery to following:

Set(CurrentItem, ThisItem)

Within the New Form Screen which contains the New Form, set the OnVisible property to following:

Set(CurrentItem, Blank())

Within the Edit form Screen which contains the Edit form, set the Item property of the Edit form to following:

If(
!IsBlank(CurrentItem),
LookUp('YourDataSource', ID = CurrentItem.ID),
Defaults('YourDataSource')
)

Or

If(
!IsBlank(CurrentItem),
LookUp('YourDataSource', ID = CurrentItem.ID),
YourNewForm.Updates
)

 

If you could provide more details about your scenario, we could provide a proper workaround for you.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-xida-msft
Community Support
Community Support

Hi @jesenavaranjan,

Could you please share a bit more about your scenario?

Do you want to populate your Edit form from the Gallery or the New Form?

I have made a test on my side, please take a try with the following workaround:

Within your Gallery screen, set the OnSelect property of the Gallery to following:

Set(CurrentItem, ThisItem)

Within the New Form Screen which contains the New Form, set the OnVisible property to following:

Set(CurrentItem, Blank())

Within the Edit form Screen which contains the Edit form, set the Item property of the Edit form to following:

If(
!IsBlank(CurrentItem),
LookUp('YourDataSource', ID = CurrentItem.ID),
Defaults('YourDataSource')
)

Or

If(
!IsBlank(CurrentItem),
LookUp('YourDataSource', ID = CurrentItem.ID),
YourNewForm.Updates
)

 

If you could provide more details about your scenario, we could provide a proper workaround for you.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.

Microsoft Build 768x460.png

Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

May UG Leader Call Carousel 768x460.png

What difference can a User Group make for you?

At the monthly call, connect with other leaders and find out how community makes your experience even better.

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