cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
smorley
Helper V
Helper V

Struggling with a SharePoint list on create flow and get items not finding anything

Happy Wednesday everyone!

 

I have a SharePoint list for projects, with Tasks and Subtasks.

 

When it's a subtask, I have a lookup field that shows all the project names.  (The lookup is a calculated field that displays if subtask eq no.)

I want to have a flow run when an item is created,. If it's a subtask, loop through the list and find the appropriate project and update the item with the project information like department, team members, document location, and some other things.

 

In the example I'm working with, it loops through the entire list, and doesn't find anything.  I then tried using an O Data filter on the Get Items step.  It tells me it's an invalid filter even though in the run it returns the right value.  So I've taken the O Data filter part out for now.

 

I'm currently using compose so I can see the information in the flow run for the condition I'm using once "get items" completes.

 

If the condition is met, I have it send me an email at the moment.

created1.jpgcreated2.jpg

Any help, as always, is appreciated.

 

1 ACCEPTED SOLUTION

Accepted Solutions
ccc333ab
Solution Sage
Solution Sage

The strProjectHidden appears to be a string (as you aptly named), while ID is an integer. I would instead change strProjectHidden to intProjectHiddenID. And convert it using int(triggerOutputs()?['body/Name of Project...']) UNLESS you also have some lines with text in here. 

 

Then only do the convert at time of comparison on the subtasks. 

 

Of note: On Compose I have found that when it shows green it is a number, black is a string. 

View solution in original post

4 REPLIES 4
ccc333ab
Solution Sage
Solution Sage

Just to clarify something, in your first compose you are setting it to [Name of project...]. Your second compose is being set to [ID]. From the outside looking in, it appears like you are comparing a name to an ID. 

 

If that is the right comparison, can you show a screenshot of the run showing the values of the compose statement on when you expect to find a matching result? 

Sure @ccc333ab Here they are:

composestrhidden.jpgcomposeid.jpg

ccc333ab
Solution Sage
Solution Sage

The strProjectHidden appears to be a string (as you aptly named), while ID is an integer. I would instead change strProjectHidden to intProjectHiddenID. And convert it using int(triggerOutputs()?['body/Name of Project...']) UNLESS you also have some lines with text in here. 

 

Then only do the convert at time of comparison on the subtasks. 

 

Of note: On Compose I have found that when it shows green it is a number, black is a string. 

View solution in original post

Yes that worked.  My only issue now is Odata filter.  Here is the condition now:

condition.jpg

Helpful resources

Announcements
Process Advisor

Introducing Process Advisor

Check out the new Process Advisor community forum board!

MPA 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

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