cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Helper I
Helper I

Patching a specific record instead of creating a new item SharePoint

Hi PowerApps Users,

 

I am trying to develop a PowerApps that essentially allows different teams to fill up different forms that eventually gets consolidated in the details screen. 

 

In such a way, 1 user creates a new item with only the date.

 

Team A then selects that item and gets brought to a navigation screen that allows them to select a "Screen A button". Team A gets navigated to Screen A and is shown fields 1, 2 and 3. Team A fills up fields 1, 2 and 3 the "tick" button patches fields 1, 2 and 3 in the SharePoint row.

 

When Team B selects the same item and clicks the "Screen B button", fields 4, 5 and 6 shows up and they fill in. The submit button patches fields 4, 5 and 6 into the SAME SharePoint row.

 

 

I am currently figuring out how to specifically tell PowerApps which item it is that they have selected and am struggling with it. WIll have to figure out how to patch before i figure out the weaving through pages.

 

Really appreciate any help i can get!!

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Super User
Super User

Re: Patching a specific record instead of creating a new item SharePoint

@TravisJohanly 
Please read my full post!

 

I am aware the ID will not always be 1001.  I was simply giving you an example.  My post was very clear about that...

 

You can pass in the ID variable by adding it as a field to your Daily Night Status form.  Add it by clicking on the Form, then Edit Fields in on the right side menu, then add field, then ID.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

6 REPLIES 6
Highlighted
Super User
Super User

Re: Patching a specific record instead of creating a new item SharePoint

@TravisJohanly 
Replace the code within FIRST+FILTER with my code below.

LookUp('Daily Night Status', ID = Value(DataCardValue20.Text)

 

If it does not work please share another screenshot.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

Highlighted
Helper I
Helper I

Re: Patching a specific record instead of creating a new item SharePoint

Hi @mdevaney ,

 

Did you mean something like this?

Capture.JPG

 

 

 

 

 

 

 

 

 

 

 

 

I did not get any errors but as you can see from the gallery, the item was not updated. I tried to patch 100123 to replace 1001.

Capture1.JPG 

Highlighted
Super User
Super User

Re: Patching a specific record instead of creating a new item SharePoint

@TravisJohanly 

You are getting closer to the solution.  This section of code is not correct

 

LookUp('Daily Night Status', ID = Value(DataCardValue11_1.Text))

 

 

You need to change the code highlighted in blue to make reference to the ID you want to patch.  For instance, if you type in the ID manually it will patch the list.

 

LookUp('Daily Night Status', ID = 1001

 

 

So, find a way to pass the ID into the formula 🙂

 

LookUp('Daily Night Status', ID = Value(DataCardValue_ID.Text))

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

Highlighted
Helper I
Helper I

Re: Patching a specific record instead of creating a new item SharePoint

Hi @mdevaney ,

 

I understand that if i type in the ID manually with LookUp('Daily Night Status', ID = 1001), i will be able to patch it in. However, it is never always 1001. It could be empty or it could be filled with some other text. How do i pass the ID of the variable field? Shouldnt LookUp('Daily Night Status', ID=Value(DataCardValue11_1.Text) work for me since it tells PowerApps that the ID is the current value of the text in DataCardValue11_1?

Highlighted
Super User
Super User

Re: Patching a specific record instead of creating a new item SharePoint

@TravisJohanly 
Please read my full post!

 

I am aware the ID will not always be 1001.  I was simply giving you an example.  My post was very clear about that...

 

You can pass in the ID variable by adding it as a field to your Daily Night Status form.  Add it by clicking on the Form, then Edit Fields in on the right side menu, then add field, then ID.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

View solution in original post

Highlighted
Helper I
Helper I

Re: Patching a specific record instead of creating a new item SharePoint

Hi @mdevaney ,

 

Alright understood what you meant. It works perfectly. On my trial and error i found that LookUp('Daily Night Status', ID=BrowseGallery1.Selected.ID) works the same 🙂

Capture3.JPG

Helpful resources

Announcements
secondImage

Demo-Extravaganza 2020

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

secondImage

Robotic Process Automation

Let's talk about the solution provided by Microsoft for Robotic Process Automation (RPA)

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!

Top Solution Authors
Top Kudoed Authors
Users online (7,333)