web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Passing Sharepoint Lis...
Power Apps
Answered

Passing Sharepoint List Item ID to Canvas APP - Error: The value 'SharePointIntegration.SelectedListItemID' cannot be converted to a number.

(0) ShareShare
ReportReport
Posted on by 177

Hello everyone,

 

I am using sharepoint list customized form to pass the Item ID of the list item to the canvas app, so that I can create my form in the app without the limitations of the customized form.

 

I am using following code:

 

  • In the object SharepointIntegration of the customized form:

 

OnNew: Launch("URL of Canvas App&ID=0");RequestHide()

 

OnEdit and OnView: Launch("URL of Canvas App&ID=SharePointIntegration.SelectedListItemID");RequestHide()

 

 

  • In the object App of the canvas app:

 

OnStart: Set(VarStartID, Param("ID"))

 

 

  • In the object Form of a screen in the canvas app:

DefaultMode: If(Value(VarStartID)>1, FormMode.Edit,FormMode.New)

 

Item: If(Value(VarStartID)>0,LookUp(Sharepoint List Name,ID=Value(VarStartID)))

 

Observation:

 

  • When I create a new item in the sharepoint list, everything works like a charme. ID = 0 is getting passed through, I get the canvas app edit form.
  • When I edit an item however, I get the following error: The value 'SharePointIntegration.SelectedListItemID' cannot be converted to a number. App freezes and can't get any data from list.
  • I have tried different things, e. g. playing with function value around the variables, but without any success.

 

Question:

 

As far as I understand it, the SharepointIntegration.selectedlistitemid is already a number. Why do I get this error and how do I make it work properly?

 

Thank you very much in advance.

 

Konstantin

 

P. S.: Code used is originally from following Source @Phillip Schlund - many thanks for inspiration

Categories:
  • Verified answer
    Nuriel Profile Picture
    177 on at

    I have found a solution, thus no help is needed here anymore.

     

    If someone is interested, it is described in following Source - Thank you @pankaj Surti.

     

    Passing the selectedlistitemId not via the URL but via the described method did the trick.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 342 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 271

#3
Mohsin Ali Profile Picture

Mohsin Ali 239

Last 30 days Overall leaderboard