cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

"Could not find list item" by initializing variable through "EditForm1.LastSubmit.Identifier".

I'm working on an App to share a link of uploaded picture back to SharePoint List by creating an Automate when the image is clicked like picture attached.Editform1.LastSubmitEditform1.LastSubmit

 And the Automate is designed as below:AutomateUpdateItemAutomateUpdateItemSo once executed, the variable initialized and all input collected but error message 404 shows.

initialize variableinitialize variableUpdate itemUpdate item

So if suggestion where went wrong.

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support
Community Support

Hi @Michaelcwang2 ,

Do you want to pass the EditForm1.LastSubmit.Identifier formula result as Item ID to your flow?

 

Based on the screenshot that you mentioned, I think there is something wrong with the List Item ID you passed from your canvas app through the EditForm1.LastSubmit.Identifier formula.

 

According to the "initialize variable" screen, I find that the List Item ID value you retrieved from your canvas app is 0 (zero), but in a SP List, the List Item ID (System field, auto-populated by SharePoint server) is starting from 1. So I think there is something wrong with the EditForm1.LastSubmit.Identifier formula result.

 

Actually, the EditForm1.LastSubmit formula would be populated with proper record value only after you submit your Edit form successfully. If your Edit form is in New mode, or you do not submit your Edit form data or your Edit form has been reset, the EditForm1.LastSubmit formula would be blank, the EditForm1.LastSubmit.Identifier formula would be Blank.

 

If you are editing an existing record in your SP List, please modify your formula within the OnSelect property of the Image control as below:

UploadaphotoandcreatealinktoSharePointfromPowerApps.Run(
                                                        Subtitle2.Text,
                                                        MyCamera.Photo,
                                                        BrowseGallery1.Selected.'識別碼 ({Identifier})'
)

Note: I assume that the '識別碼 ({Identifier})' represents the ID column (List Item ID) in your SP List. The BrowseGallery1 represents the Gallery in your app, please replace it with actual Gallery name.

 

If you are creating a new entry in your SP list, the List Item ID value would not be generated until you submitted your form data to your SP List successfully. So you should submit your form data back to your SP List firstly. Please consider set the OnSuccess property of the Edit form to following:

Set(ListItemID, EditForm1.LastSubmit.'識別碼 ({Identifier})'); // Add this formula to store the List item ID into a variable when you submit your form data

Then you could reference the List Item ID value of the created List Item through this variable in your UploadaphotoandcreatealinktoSharePointfromPowerApps.Run() function:

UploadaphotoandcreatealinktoSharePointfromPowerApps.Run(
                                                        Subtitle2.Text,
                                                        MyCamera.Photo,
                                                        ListItemID ({Identifier})'
)

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

2 REPLIES 2
Community Support
Community Support

Hi @Michaelcwang2 ,

Do you want to pass the EditForm1.LastSubmit.Identifier formula result as Item ID to your flow?

 

Based on the screenshot that you mentioned, I think there is something wrong with the List Item ID you passed from your canvas app through the EditForm1.LastSubmit.Identifier formula.

 

According to the "initialize variable" screen, I find that the List Item ID value you retrieved from your canvas app is 0 (zero), but in a SP List, the List Item ID (System field, auto-populated by SharePoint server) is starting from 1. So I think there is something wrong with the EditForm1.LastSubmit.Identifier formula result.

 

Actually, the EditForm1.LastSubmit formula would be populated with proper record value only after you submit your Edit form successfully. If your Edit form is in New mode, or you do not submit your Edit form data or your Edit form has been reset, the EditForm1.LastSubmit formula would be blank, the EditForm1.LastSubmit.Identifier formula would be Blank.

 

If you are editing an existing record in your SP List, please modify your formula within the OnSelect property of the Image control as below:

UploadaphotoandcreatealinktoSharePointfromPowerApps.Run(
                                                        Subtitle2.Text,
                                                        MyCamera.Photo,
                                                        BrowseGallery1.Selected.'識別碼 ({Identifier})'
)

Note: I assume that the '識別碼 ({Identifier})' represents the ID column (List Item ID) in your SP List. The BrowseGallery1 represents the Gallery in your app, please replace it with actual Gallery name.

 

If you are creating a new entry in your SP list, the List Item ID value would not be generated until you submitted your form data to your SP List successfully. So you should submit your form data back to your SP List firstly. Please consider set the OnSuccess property of the Edit form to following:

Set(ListItemID, EditForm1.LastSubmit.'識別碼 ({Identifier})'); // Add this formula to store the List item ID into a variable when you submit your form data

Then you could reference the List Item ID value of the created List Item through this variable in your UploadaphotoandcreatealinktoSharePointfromPowerApps.Run() function:

UploadaphotoandcreatealinktoSharePointfromPowerApps.Run(
                                                        Subtitle2.Text,
                                                        MyCamera.Photo,
                                                        ListItemID ({Identifier})'
)

 

Please consider take a try with above solution, then check if the issue is solved.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

@v-xida-msft 

Appreciate your comment and you were right that item "0" didn't make sense so I found and change to "Id" instead of "Identifier" but truly appreciate your overall review.

Helpful resources

Announcements
News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

Power Apps Community Call

Power Apps Community Call- January

Check out the Power Apps Community Call for January 2021

PP Bootcamp Carousel

Global Power Platform Bootcamp

Dive into the Power Platform stack with hands-on sessions and labs, virtually delivered to you by experts and community leaders.

secondImage

Power Platform Community Conference On Demand

Watch Nick Doelman's session from the 2020 Power Platform Community Conference on demand!

Top Solution Authors
Top Kudoed Authors
Users online (6,682)