web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Multiple views in 'Lim...
Power Automate
Suggested Answer

Multiple views in 'Limit Columns by View' field?

(0) ShareShare
ReportReport
Posted on by 23
Hello! I have a SharePoint list with too many look up columns and am creating Views to address that issue. If I need to pull metadata from more than one View in a flow, is it possible to list more than one view in the 'Limit Columns by View' field? Or do I just do a Get items for each View that contains the needed data before the step where it's needed? I think I know the answer but need other's expertise to confirm or provide alternatives.
 
Thank you!!
Categories:
I have the same question (0)
  • Suggested answer
    rzaneti Profile Picture
    4,249 Super User 2025 Season 2 on at
    Hi,
     
    I did some research and it seems not to be possible to combine the results from two views in a same action. I see two options here: (1) use one Get Items for each view and then combine the results into a single array or (2) use a HTTP request to return only the desired columns. 
     
    Get items for each view
    I tested this approach using only two views, so it must be more complicated if you have a large number of views. Add your Get items actions and then use an Apply to each loop for one of them, as marked in red. Inside the loop, add an Filter array action, where the From input will be the the records returned by the other Get items, as marked in blue. Inside the Filter array, you must match the ID column from both Get items actions:
     
    The outcome from Filter array must be the record from the second Get items that matches to the currently iterated record from the first Get items in the loop. Now we need to merge them into a single object, and you can achieve it with a union() formula, passing the item() expression (highlighted in yellow) and the first element of the Filter array (highlighted in green) as inputs:
     
    The output will be a single object merging the columns from both views. Any columns existing in both views (like the metadata columns, such as ID, created at, and so on) will be ignored, so you won't have duplicates in our object. After that, if it makes sense for your use case, you can append this result to an array variable.
     
    HTTP request
    This approach requires only one action to return all records with all columns. The inconvenient is that you must fill all of the desired columns into the request URI (highlighted in yellow): 
     
    URI: /_api/web/lists/GetByTitle('Choice cols')/items?$select=ID,col_1
     
    Make sure to replace the bolded fields in the URI for your actual data. The result from this action looks like this: 
     
    As you mentioned that you are working with too many Lookup columns, it's possible that you face some limitations with this approach. In this case, you can try to work with an expand query, like recommended in this similar discussion: https://sharepoint.stackexchange.com/questions/303858/too-many-lookup-fields-in-the-rest-api-url-exceed-the-size-limit
     
    Let me know if it works for you or if you need any additional help!
    -------------------------------------------------------------------------
    If this is the answer for your question, please mark the post as Solved.
    If this answer helps you in any way, please give it a like.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 501 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 323 Moderator

#3
abm abm Profile Picture

abm abm 237 Most Valuable Professional

Last 30 days Overall leaderboard