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

Report
All responses (
Answers (