cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
godala_vamshi
Helper II
Helper II

Value overriding on ID field connected to SharePoint list

Hello,

I have a Canvas app connected to SharePoint list which has “ID” field, somehow ID of record in SharePoint and Canvas app is not same, even though I tried changing from app and submit, value changes back to something else(I'm not updating ID field value on form with any logic), below is the example. Also noticed when I try to add ID field on form I see multiple ID fields( img below),  Datafield looks different as well, could you help with this?

ID on SharePoint list for below record is 3

But ID on Canvas app is 1

godala_vamshi_0-1623367820239.png

godala_vamshi_1-1623367849060.png

godala_vamshi_2-1623367862137.png

Thank you 

 

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @godala_vamshi ,
You cannot create a new ID field in SharePoint - as I mentioned, it is automatically created, however I suspect that if you imported SQL data with an ID field already there, it will be called something else like ID_1.

The App had no data, it simply reads the field values from the data source, so whatever you "point at" will be shown.

If you simply want a unique reference field other than the ID, use the one imported from SQL, the problem here will be updating/incrementing it on new records. I personally would (and do) simply use the SharePoint ID.

 

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.

 

 

View solution in original post

7 REPLIES 7
WarrenBelz
Super User III
Super User III

Hi @godala_vamshi ,

What exactly are you trying to do here? The ID field of a SharePoint list is auto-generated and is an incremental unique numeric value (starting at 1 for the first item created) and you cannot change or edit it.

If you put ID as the DataField (or ThisItem.ID in a gallery), you will see the number.

 

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.

 

 

@WarrenBelz Thanks for your time on this, When I 1st imported this data into SharePoint list from SQL, SQL has the same ID field, I want to keep this ID field same in SQL, SharePoint, & App, but I see there is miss match of ID’s in all three places, I want to make sure it matches with SQL data.

 

Do you think I should create new ID field on SharePoint list and map that field with SQL ID and use that on form? 

Thank you

 

Hi @godala_vamshi ,
You cannot create a new ID field in SharePoint - as I mentioned, it is automatically created, however I suspect that if you imported SQL data with an ID field already there, it will be called something else like ID_1.

The App had no data, it simply reads the field values from the data source, so whatever you "point at" will be shown.

If you simply want a unique reference field other than the ID, use the one imported from SQL, the problem here will be updating/incrementing it on new records. I personally would (and do) simply use the SharePoint ID.

 

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.

 

 

View solution in original post

@WarrenBelz  I agree what even fields on App will refer to fields in SharePoint list data, but my issue here is, ID value on SharePoint ID and App ID are different, when I try to change it to 3 on App asper SharePoint list, it is changing back to 1, not sure what are those fields referring to(as you mentioned it is referring to "OData__x0049_D1"). And there only one ID field on SharePoint list. 

godala_vamshi_0-1623388116159.pnggodala_vamshi_1-1623388137988.png

 

Hi @godala_vamshi ,

I am a little lost here - what do you mean by the "App ID" - the app has no data - it will display whatever field you refer to in SharePoint.

@WarrenBelz  I was able to figure out this issue, I have ID field on SharePoint list and when I create a App with that list, App is creating another ID field which is incrementing on create of new record.

Thanks for your time on this. 

 

 

Hi @godala_vamshi ,

That is what I suspected a number of posts back

As I mentioned, it is automatically created, however I suspect that if you imported SQL data with an ID field already there, it will be called something else like ID_1.

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (4,224)