cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
johannasouth
Helper III
Helper III

SharePoint - Create Item not creating item

I have two SP list:  Framework Checklist and Checklist Dashboard.

 

When I create an item in Framework Checklist via Flow , my flow looks the the Checklist Dashboard and determines if there is a record using the App ID (unique ID).  If there isn't, create a new record in the Checklist Dashboard.  

 

I have the logic to get items, and its recognizing that there isn't a record with my App ID yet, but when it goes to the Create Item step, it checks it as Green, but doesn't actually create the item.  I'm out of ideas on what's happening.

 

johannasouth_1-1654692149029.png

 

 

 

johannasouth_0-1654692048478.png

 

1 ACCEPTED SOLUTION

Accepted Solutions
v-jefferni
Community Support
Community Support

Hi @johannasouth ,

 

Have you solved this issue? As @AmDev said, it seems you are using the App ID from outputs of the Get items action. Since you have a Condition to check if it's empty of the outputs, in the true branch it means when nothing have retrieved from the Checklist Dashboard then create new items based on the retrieved item's App ID, it doesn't make sense. So just checking if you have selected correct App ID in dynamic contents, it should become the previous actions rather than the Get items action.

 

Best regards,

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

View solution in original post

4 REPLIES 4
AmDev
Super User
Super User

Hi @johannasouth 

 

It looks like your flow is trying to loop through an apply to each with the (array 'value') output from the 'Get items' step?

 

If so, the output of the get items step has '0' values if it goes down the left branch, therefore your apply to each will iterate '0' times, therefore creating no records

 

AmDev_0-1654697190230.png

 

Where is the 'App ID' dynamic content being taken from? - It looks like this may have been taken from the previous 'get items' step (and has automatically created the Apply to each), but the App ID should have been taken from the trigger, which I'm assuming is 'When an Item is created'?

 

I'm making a few assumptions here, but hopefully this is of some assistance.

 

Basically what I'm trying to do is say:

1. Get items using a filter of AppID eq dynamic App ID of create items

2. My condition step says if length(outputs('Get_items')?['body/value']) = 0 (meaning this AppId isn't already in my SP list, return a 0

3.  Once it returns a true for the condition, the apply to each says "create a new item"

 

How do I get the output to have what I need to create a new item with that App ID?

@AmDev  looks like he is right in his post above. Try your Create Item action outside of the apply all, and make sure you are setting the App ID based on a value that exists.

Currently It looks like you are trying to set the AppID to a value you found in your 'Get Items', however your condition is set up to say only do this when there is no Item found.

v-jefferni
Community Support
Community Support

Hi @johannasouth ,

 

Have you solved this issue? As @AmDev said, it seems you are using the App ID from outputs of the Get items action. Since you have a Condition to check if it's empty of the outputs, in the true branch it means when nothing have retrieved from the Checklist Dashboard then create new items based on the retrieved item's App ID, it doesn't make sense. So just checking if you have selected correct App ID in dynamic contents, it should become the previous actions rather than the Get items action.

 

Best regards,

Community Support Team _ Jeffer Ni

If this post helps, then please consider Accept it as the solution to help the other members find it.

Helpful resources

Announcements
 WHAT’S NEXT AT MICROSOFT IGNITE 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Register for a Free Workshop.png

Register for a Free Workshop

Learn to digitize and optimize business processes and connect all your applications to share data in real time.

Users online (1,146)