cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Vinith
Level: Powered On

powerapps dynamic increment

Hi Team,

 

Need your help to resolve this,

 

 

I have gallery list as below , I have 4 gallery with below (in real case multiple gallery)

 

scenario-1

scenario-2

scenario-3

scenario-4

 each gallery is provided an option to delete the,

 

My requirement is , If an gallery is deleted from middle the the next to the gallery should take the deleted number

 

If in above case scenario-2 is deleted , Then My Scenario-3 name should be changed to scenario-2 and scenario-4 name should be changed to scenario-3 and go on....

 

 

 

 

 

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Community Support Team
Community Support Team

Re: powerapps dynamic increment

Hi @Vinith ,

Do you want to populate the Text Box values into your Gallery when you press the "Button" in your app?

 

I have made a test on my side, please consider take a try with the following workaround:1.JPG

 

2.JPG

 

3.JPG

Set the OnSelect property of the "Add" button to following:

Collect(RecordsCollection, {Name: "Details-" & CountRows(RecordsCollection)+1, TextBoxValue: TextInput1.Text})

Add a Gallery control, set the Items property to following:

RecordsCollection

Within the Gallery, add a "Remove" icon, set the OnSelect property to following:

Remove(RecordsCollection, ThisItem);
Clear(RecordsCollection1);
ForAll(
RecordsCollection,
Collect(RecordsCollection1, {Name: "Details-"& CountRows(RecordsCollection1)+1, TextBoxValue: TextBoxValue})
);
ClearCollect(RecordsCollection, RecordsCollection1)

Please check the following GIF screenshot for more details:Test.gif

 

Please take a try with above solution, then check if the issue is solved. Please take a try with the sample app I attached below.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Community Support Team
Community Support Team

Re: powerapps dynamic increment

Hi @Vinith ,

Could you please share a bit more about your scenario?

Do you add multiple Gallerys within your app?

Do you want to name the Gallerys dynamically within a canvas app?

 

If you want to name the Gallerys dynamically within a canvas app, I afraid that there is no way to achieve your needs in PowerApps currently.

There is no way/functions supported to change the name of Gallery control dynamically in PowerApps. We could only specify a name for the Gallery manually.

 

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Fourm:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Vinith
Level: Powered On

Re: powerapps dynamic increment

Hi @v-xida-msft 

 

Thanks for the response,

 

My actual requirement is:

 

I have textbox1  and textbox2 and an button(Add to list)

 

When i click on button(Add to list) the textbox details should be shown in the gallery with a name( details -1 )

When i click again an button(Add to list) a new gallery should be shown with textbox details with a name (details -2)

 

Here i have 5 gallery details(Details 1 , Details-2, details-3, details-4, Details 5)

 

So from above if i delete the second gallery(Details-2 ) them my details -3 should have name details -2 and details -4  as details-3

 

To display the name(Details-1) we can even use an label as well but when we delete an gallery details the other names should change 

 

 

 

 

 

 

 

 

 

 

 

 

Community Support Team
Community Support Team

Re: powerapps dynamic increment

Hi @Vinith ,

Do you want to populate the Text Box values into your Gallery when you press the "Button" in your app?

 

I have made a test on my side, please consider take a try with the following workaround:1.JPG

 

2.JPG

 

3.JPG

Set the OnSelect property of the "Add" button to following:

Collect(RecordsCollection, {Name: "Details-" & CountRows(RecordsCollection)+1, TextBoxValue: TextInput1.Text})

Add a Gallery control, set the Items property to following:

RecordsCollection

Within the Gallery, add a "Remove" icon, set the OnSelect property to following:

Remove(RecordsCollection, ThisItem);
Clear(RecordsCollection1);
ForAll(
RecordsCollection,
Collect(RecordsCollection1, {Name: "Details-"& CountRows(RecordsCollection1)+1, TextBoxValue: TextBoxValue})
);
ClearCollect(RecordsCollection, RecordsCollection1)

Please check the following GIF screenshot for more details:Test.gif

 

Please take a try with above solution, then check if the issue is solved. Please take a try with the sample app I attached below.

 

Best regards,

Community Support Team _ Kris Dai
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,121)