cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
kukulka
Resolver I
Resolver I

Get selected rows from data gain from gateway

Hi,

 

I get a webservice via gateway where in table are stored: Name, Address, Phone. There are about 200 records. I need to import it to PowerApps. Then have possibility to choose all the records or just a few of them (with checkbox?). Then each record would be printed to PDF file.

 

Any idea how to show  list of records with checkboxes to choose some of them?

 

Maciej

2 ACCEPTED SOLUTIONS

Accepted Solutions
KennethNicasens
Resolver III
Resolver III

Hi @kukulka ,

 

You can display all the records in a gallery ( you can add a search to this aswell). Within this gallery you can add a checkbox. 

In the Oncheck Property:

Collect(colSelectedItems,ThisItem)

In the OnUnCheck:

Remove(colSelectedItems,ThisItem)

 

If you want to reset all the checkboxes you will need to place a button that will put a variable to true and then false.

Set(_ResetCheckboxes,true);Set(_ResetCheckboxes,false)

 

on the checkbox you have a reset property and set this to the variable.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

View solution in original post

@kukulka ,

 

That's no problem.
You can create a button or some input you want.

OnSelect:
UpdateContext({_CheckAll:!_CheckAll}); If(_CheckAll,ClearCollect(colCollection,Gallery1.AllItems),Clear(colCollection))

Text:
If(_CheckAll,"Uncheck All","Check All")

 

in the Default property of your checkbox:

_CheckAll

View solution in original post

7 REPLIES 7
KennethNicasens
Resolver III
Resolver III

Hi @kukulka ,

 

You can display all the records in a gallery ( you can add a search to this aswell). Within this gallery you can add a checkbox. 

In the Oncheck Property:

Collect(colSelectedItems,ThisItem)

In the OnUnCheck:

Remove(colSelectedItems,ThisItem)

 

If you want to reset all the checkboxes you will need to place a button that will put a variable to true and then false.

Set(_ResetCheckboxes,true);Set(_ResetCheckboxes,false)

 

on the checkbox you have a reset property and set this to the variable.

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

Hi @KennethNicasens 

that works great. Thank you. have you got any idea how to set button: "Select all" checkboxes? Amount of variables in gallery is changing.

@kukulka ,

 

That's no problem.
You can create a button or some input you want.

OnSelect:
UpdateContext({_CheckAll:!_CheckAll}); If(_CheckAll,ClearCollect(colCollection,Gallery1.AllItems),Clear(colCollection))

Text:
If(_CheckAll,"Uncheck All","Check All")

 

in the Default property of your checkbox:

_CheckAll

Fantastic. I see I have a lot to learn 🙂

That's why we have a great community!

We all have lots to learn 😉

Awesome. Have a nice day Kenneth.

Hi @KennethNicasens 

I tried to connect these two formulas.

1. Select All/Unselect All

2. Select each checkbox separately (add record to Collection), unselect checkbox (remove record from Collection).

 

Unfortunately I have problem with formula dedicated checkbox in UnCheck textbox.

2020-02-20 14_05_20-.png

 In reference to article: https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/create-update-collection, Remove function should work correct.

Any idea where is my mistake and how to fix this?

 

 

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.

Top Solution Authors
Top Kudoed Authors
Users online (2,002)