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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / how to check whether a...
Power Automate
Unanswered

how to check whether a list is exist or not

(0) ShareShare
ReportReport
Posted on by 19

Hello all,

 

I have created form in power apps and it built a list with a few columns.  The problem is that I dynamically created a list by form entering a value and I want to build a new list if the list was not created before. Also if it was created before, I want to add form values to the existing list.

 

Is there any option or suggestion?

 

Thanks in advance.

 

Gursel

 

 

Categories:
I have the same question (0)
  • vivekpande18 Profile Picture
    894 Super User 2024 Season 1 on at

    Hi @56565 , 

     

    On click of that button call Power Automate to check if list is present or no. You can send response back to power app from power automate about the list presence. 

     

    Steps involved in power automate :

    . Trigger flow on button click

    . Use http action to get all the lists present in your site

    Api : {{site collection address}} + /_api/web/lists

     

    . Use Filter action to check the presence of your list name. Or you can add the filter in above api url as well

    ? filter = Title eq {{list name }

     

    . If response contains data that means list is already present. If reponse contain empty array that means no data is present. 

     

    . You can send this response back to your power app. 

     

    If this post helps you with your problem, please mark as Accepted solution.If you like my response, please give it a Thumbs Up.

     

    Thanks

  • 56565 Profile Picture
    19 on at

    thanks for replying.

     

    I used compose to enter the name of list from powerapps, then create a variable as array format. then I used send and HTTP request to sharepoint  with condition (_api/web/lists?$select =Title&$filter =Title eq @{outputs('Compose')} ) and next step I set variable as 

    outputs('Send_an_HTTP_request_to_SharePoint')?['body']?['d']?['results'
     
    Lastly I used conditions with length of body of send and HTTP request action.
     
    It is working but there is a logical mistake. It creates false situation always. somewhere I made mistake about expressions I think.
  • vivekpande18 Profile Picture
    894 Super User 2024 Season 1 on at

    Hi @56565 ,

     

    Steps listed by you seems to be proper. You are almost there but making some small mistake.

     

    If you figure it out well and fine else you can paste your entire flow will analyze it.

     

    Thanks,

    Vivek

     

    If this post helps you with your query, please mark as accepted solution. If you like the response, please give it a thumbs up. 

  • 56565 Profile Picture
    19 on at

    the flow is working but I want to create a new list if it does not exist. if it exists I want to add list items to this list.  the jpg file that I  am sharing is just a sample that what I want to do. the difference is to send mail in this picture. 

     

    FlowScreenShot.jpg

  • vivekpande18 Profile Picture
    894 Super User 2024 Season 1 on at

    Hi @56565 ,

     

    Exactly what issue you are facing?

     

    Thanks

    Vivek

  • 56565 Profile Picture
    19 on at

    The scenario is like this; there is a form and this form creates an SP list if it does not exist before. If already there is a list with the same name, the form fills in the list by the new item. 

     

    I have solved this problem with condition>contains my company name. because when I run Send an HTTP.... step it creates included lots of information if it is true.  If it is false it creates just this "[]". Thus I set a condition with contains. If it contains a unique word that belongs to my website run 'yes', and otherwise run 'no'.

     

     

     

     

  • vivekpande18 Profile Picture
    894 Super User 2024 Season 1 on at

    Hi @56565 , 

     

    Happy to hear that your flow is working!!! 

     

    You can mark the appropriate chat as solution and close this thread. 

    Thanks

    Vivek

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the March Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Automate

#1
Haque Profile Picture

Haque 594

#2
Valantis Profile Picture

Valantis 328

#3
David_MA Profile Picture

David_MA 281 Super User 2026 Season 1

Last 30 days Overall leaderboard