cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
bh21
New Member

How do I create a new list that is filled based on attributes selected in PowerApps?

Hi all,

 

I haven't been able to find any resources to help me with my current query.

 

Essentially, I currently have one list (List 1) which is two columns, with entity names and TRUE or FALSE. This list will be regularly updated to reflect whether or not these entities are required to report (true/false).

 

What I am wanting, is a function in my PowerApp that allows a new list to be created and somewhat filled based on the values of List 1. So for example, in PowerApps a user might see a checklist of all the entities that are True in List 1, a text area to type in the year, and they click a "Create list" button and it will create a Sharepoint List that is prefilled with those entities for that year's reporting. 

(I have added a graphic of what I want to happen).

 

The new list also would need many more columns as there are multiple reporting requirements which the selected entity will need to meet.

 

At the moment, my PowerApp just allows me to edit/add entries to List 1 which is how we will maintain that list. I would like it all in one app.

 

Any help is appreciated.


Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
v-xiaochen-msft
Community Support
Community Support

Hi @bh21 ,

 

I did a demo for you.

Note: New list created by flow only has a default column 'Title'. If you need more columns, please modify this flow as your needs.

 

vxiaochenmsft_0-1642757668529.png

vxiaochenmsft_1-1642757703897.png

vxiaochenmsft_2-1642757712472.png

Filter(LIST210,Col2=true)
Test302.Run(JSON(ShowColumns(Gallery1.AllItems,"Title"),JSONFormat.Compact),TextInput1.Text)

vxiaochenmsft_3-1642757776437.png

vxiaochenmsft_4-1642757796634.png

_api/web/lists/

 

{
"BaseTemplate": 100,
"Title": "@{variables('var2')} List 2"
}

 

vxiaochenmsft_5-1642757821133.png

json(variables('var1'))
 
_api/web/lists/GetByTitle('@{variables('var2')} List 2')/items/
 
{
"Title":"@{items('Apply_to_each')['Title']}"
}
 
vxiaochenmsft_6-1642757840923.png

 

vxiaochenmsft_7-1642757850111.png

 

Finally, make sure the user using the api has permission to create list/items.

 

Best Regards,

Wearsky

 

View solution in original post

1 REPLY 1
v-xiaochen-msft
Community Support
Community Support

Hi @bh21 ,

 

I did a demo for you.

Note: New list created by flow only has a default column 'Title'. If you need more columns, please modify this flow as your needs.

 

vxiaochenmsft_0-1642757668529.png

vxiaochenmsft_1-1642757703897.png

vxiaochenmsft_2-1642757712472.png

Filter(LIST210,Col2=true)
Test302.Run(JSON(ShowColumns(Gallery1.AllItems,"Title"),JSONFormat.Compact),TextInput1.Text)

vxiaochenmsft_3-1642757776437.png

vxiaochenmsft_4-1642757796634.png

_api/web/lists/

 

{
"BaseTemplate": 100,
"Title": "@{variables('var2')} List 2"
}

 

vxiaochenmsft_5-1642757821133.png

json(variables('var1'))
 
_api/web/lists/GetByTitle('@{variables('var2')} List 2')/items/
 
{
"Title":"@{items('Apply_to_each')['Title']}"
}
 
vxiaochenmsft_6-1642757840923.png

 

vxiaochenmsft_7-1642757850111.png

 

Finally, make sure the user using the api has permission to create list/items.

 

Best Regards,

Wearsky

 

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

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.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Users online (3,542)