cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Holly_CMS
Responsive Resident
Responsive Resident

Get Item vs Get Items - both not too helpful :/

Hi All! Happy New Year 🙂

 

This is a simple flow yet the Get Item(s) actions have been a bitty challenging for me. 

 

Get Item action would pass successfully but it loops. Not sure how to stop that....However, I am not able to filter to a specific field - ErrorTypes - that are null in that action...

 

So that takes me to Get Items action....

 

Get Items action....I had to use the custom field for ErrorTypes that is in the SP list but would NOT populate in the list of Dynamic Value. Yet that keeps failing as does not recognize - "The field 'ErrorTypes' of type 'Note' cannot be used in the query filter expression'.  WHY????!!!!! That field having NO data is the point of the flow being created. 

 

How do I get this going?? 

 

Get Item3.pngGet Item2.png

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions

You are correct on the column names that I need returned - my brain was fried yesterday 😕

 

So I checked my flow this morning and it failed. That because of the Apply to Each so I took the Update Item action out of it and deleted the Apply to Each and it worked. It started to fill in the ErrorTypes field with values in it 🙂

 

In the meantime, I am checking out your suggestion and will test that as another alternative for others that may need it and for my future reference if my flow still bombs. I will let you know. Thank you so much for your time in helping me!!

 

Get Item12.png

View solution in original post

12 REPLIES 12

@Holly_CMS The Get Item action will return a single item. The Get Items action returns all items (unless you use the Filter Query—to specify which items you want returned) from a SP LIst.

 

What are you trying to accomplish?

 

The Get Item action requires an ID to retrieve a specific item from a specific list. In this case, the list would have to be the same list that you've selected in the flow trigger.

creativeopinion_0-1705091111901.png

 

For more flow troubleshooting tips—check out this YT Tutorial: 5 Power Automate Troubleshooting FAQs and Helpful Tips for Creating Better Flows

In this tutorial I cover:

 How to troubleshoot a false Condition action result

 How to get dynamic content when it isn’t selectable from the list of dynamic content

 How to troubleshoot an Apply to Each action that isn’t looping through

 How to troubleshoot a skipped Apply to Each action

 How to troubleshoot a Filter Query

 How to use a SharePoint yes/no column in a Filter Query

 How to use Compose actions to troubleshoot a Power Automate flow

How to troubleshoot multiple emails being sent

 How to troubleshoot multiple Teams messages being sent

 

----

 

Take a look a this YT Tutorial I recently uploaded: 3 Mistakes YOU 🫵 are Making with the Apply to Each Action in your Microsoft Power Automate Flow

In this video tutorial I’ll go over how to avoid these common mistakes when using the Apply to Each action in a Power Automate flow:

1️⃣ Looping through a Single Item

2️⃣ Creating Unnecessary Nested Loops

3️⃣ Looping through an Unfiltered Array

At the end of the video I share a few helpful insights when it comes to using the Apply to Each action in your flow.

I'll also cover:

 How to avoid the Apply to Each action with a single item array

 How to use the item() function to access dynamic content in an array

 How to prevent unnecessary nested Apply to Each action loops

 How to use the Select action

 How to convert an array to a string with the Select action

How to use the Filter Query field

 How to count the number of items in an array

 How to use a condition control

 How to use the concurrency control

 How to set a top count

 How to use Compose actions for troubleshooting

 

Hope this helps!



If I helped you solve your problem—please mark my post as a solution .
Consider giving me a 👍 if you liked my response! 

👉 Watch my tutorials on YouTube
👉 Tips and Tricks on TikTok

 

Pstork1
Most Valuable Professional
Most Valuable Professional

The problem with the Get Items action is that you can't query on null fields in a Get items because those fields are not sent to decrease the size of the data package.  You can do a filter array to select rows with a null value in a specific field, but that is only after you have retrieved all the items using Get Items.  I'm also not sure what kind of column you are using for ErrorTypes. SharePoint doesn't have a Notes column type.



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

I am aware of the differences of these two actions and that is not what I am asking for. I am asking for assistance to get either one of them to work as I need the flow to work.

 

The goal is to get the values from other fields within the same SP List to combine into one sentence in the ErrorTypes field. I do not know why Power Automate called the field NOTE in the error message but it is a multiple lines of text field. 

 

As you can see in the pictures of all the fields below that I want combined and put in the Error Types field. The pink highlights shows the combined and the yellow as NULLS. The reason for the Nulls is because in another flow (and we cannot alter that flow due to the complexity and difficulties to fix it every time I update it. Hence this new short flow) is updating the list AFTER the approval flow, not before it goes out before approval....With that said, it's causing some of the rows have nulls in the field and then the report comes out blank....and I can't build a Power BI without these values yet....

 

Get Item4.png

 

Get Item5.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Get Item6.png

 

 

 

 

 

Get Item7.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

Get Item8.pngI hope this clarifies for your question of accomplishment.

@Holly_CMS To clarify, you are looking to list the column name(s) in the Error Type column as a string of text if the value of the is true. Is that correct?

please see my reply above (under CreativeOpinion)....especially regarding the Notes Column type....

 

see error message on the right....Get Item9.png

 

 

 

And I have used fields that have Nulls in the Get Items filters in other flows without a problem....

 

 

No, the values from the multiple fields into one in ErrorTypes Field....

 

In the ErrorTypesCompose action....

concat(if(equals(outputs('Get_Items')?['body/DuplicateNoteType'],'True'),concat('Duplicate Note Type'', '),''),
if(equals(outputs('Get_Items')?['body/HighMinutes'],'True'),concat('High Minutes'', '),''), 
if(equals(outputs('Get_Items')?['body/HighUnits'],'True'),concat('High Units'', '),''), 
if(equals(outputs('Get_Items')?['body/LongTimeNoUnits'],'True'),concat('Long Time With No Units'', '),''), 
if(equals(outputs('Get_Items')?['body/Short_Counseling'],'True'),concat('Short Counseling'', '),''), 
if(equals(outputs('Get_Items')?['body/ZeroUnits'],'True'),concat('Zero Units'', '),''), 
if(equals(outputs('Get_Items')?['body/NegativeMinutes'],'True'),concat('Negative Minutes'', '),''), 
if(equals(outputs('Get_Items')?['body/NoContactWith'],'True'),concat('No Contact With'', '),''), 
if(equals(outputs('Get_Items')?['body/HighCharLowTime'],'True'),concat('Long Content - Low Time'', '),''), 
if(equals(outputs('Get_Items')?['body/LowCharHighTime'],'True'),concat('Short Content - High Time'', '),''), 
if(equals(outputs('Get_Items')?['body/MontanaZeroBU'],'True'),concat('Montana Zero BU'', '),''), 
if(equals(outputs('Get_Items')?['body/LateEntry'],'True'),concat('Late Entry'', '),''), 
if(equals(outputs('Get_Items')?['body/AZFocusArea'],'True'),'AZ Focus Area'''))

 

In the FinalErrorTypesCompose action....

substring(trim(outputs('ErrorTypesCompose')), 0, sub(length(trim(outputs('ErrorTypesCompose'))), 1))
 
Then in the Update Item action, the output is added to the ErrorTypes Field...
Get Item10.png

 

@Holly_CMS Can you confirm the type of column you are using for the Columns you have in your screenshot? Are they a single line text field?

Holly_CMS
Responsive Resident
Responsive Resident

The ones in the True/False columns - those are the single line of text

the ErrorTypes field is a multiple lines of text. 

I just changed up the flow a little and will see what it looks like tomorrow morning when the new rows of data comes in....I just know it didn't kick off the warning loop message this time...The When an item is created action.....

 

Get Item11.png

@Holly_CMS After reviewing your expression it does look like you are only wanting to return the names of the columns where the value is True (and not if the value is False). In this case I would recommend

 

Creating an array of your column data as I've shown below. 

creativeopinion_0-1705114179646.png

The output of this Compose action looks like this.

creativeopinion_2-1705114728306.png

Then, with a Filter Array action you can filter out any blank columns.

creativeopinion_3-1705114784241.png

Run a test. The output of the Filter Array action should not display any blank items.

creativeopinion_11-1705115143136.png

 

In another Compose action, check the count of items returned from the Filter Array action.

creativeopinion_4-1705114809436.png

Initialize a String variable.

creativeopinion_6-1705114889139.png

 

Add a Condition check to see if the number of items is equal to 0. If so, you can set a value, if not (and there are items) set the variable with the column data.

creativeopinion_7-1705114911779.png

Sorry, I'm still unclear on your issue. Did you want to output a value if the ErrorTypes is blank?.... I've set the variable with a string of text "None".

creativeopinion_9-1705115009799.png

 

If there are items, use the Join function to convert the Array into a String separated by a comma. 

creativeopinion_8-1705114971126.png

 

Run a test. The Join action will convert the array to a string and separate each item with a comma (and it won't include a trailing comma that you need to remove).

creativeopinion_12-1705115190145.png

In the Update Item action, insert the variable into the ErrorTypes field. If you are using the Get Item action, the Update Item action shouldn't be nested inside an Apply to Each loop. 

creativeopinion_10-1705115038145.png

If you started editing this flow in the New Designer and switched over to the Classic Designer, I'd recommend creating a brand new flow and switching to the Classic Designer BEFORE you make any edits. The New Designer still has a few bugs.

 

Hope this helps!

If I helped you solve your problem—please mark my post as a solution .
Consider giving me a 👍 if you liked my response! 

👉 Watch my tutorials on YouTube
👉 Tips and Tricks on TikTok
Pstork1
Most Valuable Professional
Most Valuable Professional

Ok, that clarifies things. 

1) You can't use a multiline text field in an OData query. That's why you are getting the error message you are getting.  As I mentioned you'll need to use a Filter Array instead.  

2) If you are filtering out the blank values because you need something to concatenate for a report then take a look at the Coalesce() function.  Putting each field inside a Coalesce when you concatenate them would let you specify a default value if the field is null.  That way you don't need to do all the filtering.  Power Automate Functions: Coalesce (Handle Null Values from Objects) - FlowJoe.io



-------------------------------------------------------------------------
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

You are correct on the column names that I need returned - my brain was fried yesterday 😕

 

So I checked my flow this morning and it failed. That because of the Apply to Each so I took the Update Item action out of it and deleted the Apply to Each and it worked. It started to fill in the ErrorTypes field with values in it 🙂

 

In the meantime, I am checking out your suggestion and will test that as another alternative for others that may need it and for my future reference if my flow still bombs. I will let you know. Thank you so much for your time in helping me!!

 

Get Item12.png

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (1,251)