Showing results for 
Search instead for 
Did you mean: 
Helper I
Helper I

Multiple records associated with only one

Hi everyone


I need dev an app that i can generete various record, associated with only one.

For example, i need to input "title, date, category" and next i need input various "events, image" associated with "title, date, category".


In SQL have two tables. TableHead and TableBody.

The association is one to many.



  • id (key)
  • id_title (key associated)
  • title
  • date
  • category


  • id (key)
  • id_title (key associated)
  • event
  • image

I already know how to save records in SQL and I think I know how to associate them by generating the same "id_title (key associated)".


But I need to know how to make the power app allow me to add several "event and image" inputs as the user wants.

For example, a "+" button that adds new "event and image" fields that, when saved, are associated with the same tableHead table record.


Community Support
Community Support

Re: Multiple records associated with only one

Hi @gabrielv22 ,

Do you want to add multiple "event and image" fields via a "+" button, and saved with same tableHead table record?


Based on the needs that you mentioned, I think the Gallery control could achieve your needs. You could consider add a Gallery control within your app, and configure it as a Editable grid.

I think the repeating table sample app provided by @Shane Young would help in your scenario, please check the following video resources for more details:


On your side, please consider take a try with the following workaround:

Set the OnStart property of the App to following:

ClearCollect(GalleryCollection, 1)

Add a Gallery control (Gallery1) within your app, set the Items property to following:


within the Gallery, add a Text Input box (EvenytTextInputBox) and a "Add Picture" control to collect your entry.

Outside this Gallery, add a "+" icon, set the OnSelect property to following:

Collect(GalleryCollection, CountRows(GalleryCollection)+1)

Add a Edit form (Form1) above the Gallery, then connect it to your TableHead SQL Table. Set the DefaultMode property of the Edit form to following:


set the OnSelect property of the "Submit" button to following:


set the OnSuccess property of the Edit form to following:

ForAll(                                /* <-- Save multiple records from your Gallery back to your TableBody Table along with same "title, date, category" record */
id_title: Form1.LastSubmit.id_title,
event: EvenytTextInputBox.Text,
image: UploadedImage1.Image
} ) );

Please consider take a try with above solution, then check if the issue is solved.


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.
Helper I
Helper I

Re: Multiple records associated with only one

That worked!


Now, I have a problem with previewing the image.

Repeat the images in the gallery. But only when I am seeing them, because the correct ones are saved in the database.


Here I load the first image:


Here I try to load the second image but I repeat the previous one:



I need you to generate the record in the collection completely empty, with no image.

It also changes the text in the add image box. Change from "change image" (Image1) to "Add image" (Image2), when the image is already loaded.


I use this FX:

Patch(Col_TmpDetalleIns; ThisItem; {observacion: InputObs.Text; accion_tomada: InputAccion.Text; foto: UploadedImage1.Image});;
Collect(Col_TmpDetalleIns; {observacion: ""; accion_tomada: ""; foto: ""})

Helpful resources

August 2020 Community Challenge: Can You Solve These?

August 2020 Community Challenge: Can You Solve These?

We're excited to announce our first cross-community 'Can You Solve These?' challenge!


Return to Workplace

Reopen responsibly, monitor intelligently, and protect continuously with solutions for a safer work environment.


Super Users Coming in August

We are excited for the next Super User season.


Community User Group Member Badges

FIll out a quick form to claim your community user group member badge today!


Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (9,103)