cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bbsin
Post Prodigy
Post Prodigy

ID to retrieve SP list and update one new column in SP list??

Hi

 

Is it possible to use SP list ID to retrieve the same row item and patch or not sure to update a new column of the same row?

 

eg ID using Item Number 123 for Item A ...to view the row item - 4 fields,   is unique or is it better to use SP list ID ad update the one column  of item A (eg final approved item number 22222) ? 

 

list 

Item Number   Item Desp Item amount  final number

1111                 aaaaa         2222              need to update here.

 

anyone can help the steps?

1 ACCEPTED SOLUTION

Accepted Solutions

Hi@bbsin,

What I mean the Dropdown is the drop-down control rather than the column type.

I do not know if there is no Dropdown control, why you describe as below:

the column selected are text, do I use text or value?

If there is no Dropdown control for you to select invoice number, and it is a TextInput/Label control there to display the invoice number, please refer to the invoice number directly as below:

Patch(YourSPList,LookUp(YourSPList,'Invoice Number' = Selected.Text),{ColumnName:text})

Regards,

Qi

 

 

Best Regards,
Qi

View solution in original post

6 REPLIES 6
mahoneypat
Dual Super User
Dual Super User

Here is a good video on patching with SharePoint lists.

Power Apps Patch function with SharePoint | Reza's Blog (rezadorrani.com)

 

Also, here is a post that may specifically address your question.

Patch SP List Field with ID From Gallery Selection - Power Platform Community (microsoft.com)

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about the Power Platform, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


v-qiaqi-msft
Community Support
Community Support

Hi@bbsin,

Based on the issue that you mentioned, do you want to patch your SP list referring to the ID column?

Could you please share a bit more about the scenario?

As we know, the ID column has a unique value which is automatically generated by default in SharePoint list.

So if you want to update a new column, you should firstly find out the record to determine the ID.

Here is a formula sample you could refer to:

Patch(YourSPList,LookUp(YourSPList,ID=xxxx),{ColumnName:Value})

Hope it could help.

Regards,

Qi

Best Regards,
Qi

Hi V-qiaqi-msft,

 

Thanks for replying and the formula.

 

I want to update back the same row of record of the item but only one column 

I don't plan to let the user see the ID of the SP list of the item, however, I like to use eg the invoice number column to refer back to the ID for them to update will it work?  the column selected are text, do I use text or value?

eg: 

 

Patch(YourSPList,LookUp(YourSPList,Invoice Number = selected.tex),{ColumnName:text})

 

ID   Invoice Number    Update column

       (text)                      (text)

1       1234

2        3333 

3        2345

Hi@bbsin,

The reason why I referred the ID is for its own uniqueness, if your invoice number column is as unique as the ID column, you could refer to it to update the certain field.

Could you please tell me that the column type of the invoice number column, Text type?

Do you have a dropdown to be populated with the invoice number?

Please do provide the above details in your scenario, different column type has different formula.

If it is a Text, and you have a Dropdown to display them,you could use the formula as below:

Set the Dropdown Items:

YourSPlist.'Invoice Number'
Patch(YourSPList,LookUp(YourSPList,'Invoice Number' = Dropdown.Selected.'Invoice Number'),{ColumnName:text})

Hope it could help.

Regards,

Qi

 

Best Regards,
Qi

Hi Qi

 

The number is Single line of text in SP list and it's not a dropdown. 

so Do I input as : it is correct?

Patch(YourSPList,LookUp(YourSPList,'Invoice Number' = Selected.'Invoice Number'),{ColumnName:text})

Single line of text

Hi@bbsin,

What I mean the Dropdown is the drop-down control rather than the column type.

I do not know if there is no Dropdown control, why you describe as below:

the column selected are text, do I use text or value?

If there is no Dropdown control for you to select invoice number, and it is a TextInput/Label control there to display the invoice number, please refer to the invoice number directly as below:

Patch(YourSPList,LookUp(YourSPList,'Invoice Number' = Selected.Text),{ColumnName:text})

Regards,

Qi

 

 

Best Regards,
Qi

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 (2,298)