Power app form that will populate more than one line in a list

Copper Contributor

Hello All,

 

Very novice power app individual here, we are wanting to use a power app to log our back up successes and failures (currently a piece of paper). So from a List perspective (where the data will be saved) this will need to be an individual line per backup procedure. However it would be good on the power app to have the date and then each procedure listed and be able to tick cross, add a note and then save all in one screen but on the list these all appear on different lines. Before I hunt and hunt to see how this can be done can anyone tell me if it is possible, thanks.

3 Replies

@SH0lm3s yes this is possible and not difficult, it uses a series of Patch functions to save each item from the screen into the list. I'll post some screenshots shortly.

 

Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

@SH0lm3s so this example has 2 lists, one that holds the tasks to be completed (BackupTasks) and the main list of the backup tasks completed.

 

1-dataSources.png

 The tasks get added to the screen from the BackupTasks list, or you can add them manually which is easier, particularly if the actions don't change much:

 2-taskList.png

 

Then add a checkbox:

 

3-checkBox.png

 

Then add a text input box for the comment.

4-comment.png

 

Add a button to save the items to the Backup list. In the OnSelect property add a Patch function to add each of the fields in the screen to the appropriate SharePoint column:

Patch(Backup, Defaults(Backup),
{Title: lblTask1.Text, Comment: Comment1.Text, Completed: Checkbox1.Value, Completion: Now() });

Patch(Backup, Defaults(Backup),
{Title: lblTask2.Text, Comment: Comment2.Text, Completed: Checkbox2.Value, Completion: Now() });

Patch(Backup, Defaults(Backup),
{Title: lblTask3.Text, Comment: Comment3.Text, Completed: Checkbox3.Value, Completion: Now() });

Patch(Backup, Defaults(Backup),
{Title: lblTask4.Text, Comment: Comment4.Text, Completed: Checkbox4.Value, Completion: Now() });

Patch(Backup, Defaults(Backup),
{Title: lblTask5.Text, Comment: Comment5.Text, Completed: Checkbox5.Value, Completion: Now() });

Patch(Backup, Defaults(Backup),
{Title: lblTask6.Text, Comment: Comment6.Text, Completed: Checkbox6.Value, Completion: Now() });


 

5-onSelect.png

 

You can also add any follow-on actions to navigate to a different screen, exit the app etc.

 

The checkbox next to each task is checked (or not) and any comment added and the button clicked:

 

6-form.png

 

The Patch function adds each row to an item in the list:

7-SP-listResult.png

 

Rob
Los Gallardos
Intranet, SharePoint and Power Platform Manager (and classic 1967 Morris Traveller driver)

 

 

Hi Rob,

Thanks so much for that - patching will be new to me but at least I know what I'm learning now