cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
GregorBecker
New Member

Load existing list item while creating new one

Given a sharepoint list customized with PowerApps the "new" form should have a textfield and button on the top to load the values of an existing list item into the new form. The user should be able to change the values afterwards.

 

Textfield-Name: QLRev

Button OnSelect formular: UpdateContext({RevItem:LookUp('MyList';'Number' = QLRev.Text)})

 

How can I now apply the values from the variable "RevItem" to the form fields? 

4 REPLIES 4
WarrenBelz
Super User
Super User

Hi @GregorBecker ,

Make the Default of the control (I assume a Text Box)

If(
   YourFormName.Mode=FormMode.New,
   RevItem,
   Parent.Default
)

 

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.

GregorBecker
New Member

@WarrenBelz I changed the value as you mentioned and now loading a reference is working. But the default values of the list now doesn't show when opening the new form and not loading a reference. 

 

I tried to Prefill RevItem with Lists Defaults which doesn't work:

App OnSTart Function: Set(RevItem; Defaults('MyList'))

Hi @GregorBecker ,

You now have two completely different (which I must emphasise) RevItem variables - one Global from your Set command and the second Context ( Original) item.

I am not sure what you are trying to do with the first one, but my response was in relation to the second original item There is no need to set a variable to the Defaults of a list as a form does this automatically.

 

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.

Hi @GregorBecker ,

Just checking if you got the result you were looking for on this thread. Happy to help further if not.

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.

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

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,674)