web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Binding Gallery Items ...
Power Apps
Unanswered

Binding Gallery Items to a single field in a table

(0) ShareShare
ReportReport
Posted on by 2

I have a table called DynaForm.  One column in the table is FormDefinition and it's just Text field.  It holds the "Table Definition" that would normally be the same as a Table that wouild be used in a Gallery to define the Items in the gallery.  for example, I can insert my gallery on new screen, and put this into the Gallery1.Items property: 

Table(

    { DisplayOrder: 1, Question: "Purpose of check", ResponseType: "Text" },

    { DisplayOrder: 2, Question: "Amount requested", ResponseType: "Number" }

)

like this:

LasVegasMark_1-1695980241939.png

 

and the instant I paste that into the Items property of the gallery, my dynamic form generates.

LasVegasMark_0-1695980040905.png

 

So far so good!

 

Now, I want to take that table definition, and insert it into my DynaForm.FormDefinition text field (which I have done) and then change my Gallery1.Items property so it reads the field DynaForm.FormDefinition and then the gallery would still draw the form.

 

I've tried:

1. Select Gallery1, choose Items in dropdown and put DynaForm.FormDefinition into the items property (but that gives error "Expecting Table".)

2. Select Gallery1, choose Items in dropdown and put $Dynaform.FormDefinition into the items property (but that gives same error "Expecting Table".)

3. I tried various combination of code inside the text field (like removing the "Table(" and ")" from the data in the text field and tried putting Table($Dynaform.FormDefinition) into the Galler1.Items property, but nothing displays.

4. Everyother thing I could think of.

 

So if the Gallery1.Items can let me paste the Table definition above into the Items property, what do I bneed to do so that it can get the entire Table defintion out of a text field so that Gallery1.Items will see it as a valid table or set of items and draw the dynamic form, just as it draws the form when i input the table defintion into the items property directly?

 

I even tried a named formula in the App.Formulas section like:

dynamicForm = Dynaform.FormDefinition;

 

and then tried to set Gallery1.Items to dynamicForm, but nothing appears.

 

What do I insert into my Dynaform.FormDefinition text field so that when set my Gallery1.Items to DynamicForm.FormDefintion it will use the definition of that table that is stored in the text field, and instantly generate the form?  Or put another way: What do I set my Gallery1.Items property to so that it uses the contents of the text field Dynaform.FormDefinition to properly interpret the field as a table defintion of items for the Gallery1?

-Mark

Categories:
  • AndrewR1 Profile Picture
    1,572 Moderator on at

    Hi @LasVegasMark I'm not 100% sure that you are using the correct approach here I would maybe try using collections and try passing that as the item property instead? 

     

    So on select of the Gallery ClearCollect(Table Definition) and have this as the Items property I'm not sure this will work but you could give it a try? 

     

    I would also consider replacing the Table in the Gallery with a collection as well as this may make things much easier to work with? 

     

    Sorry I cant be any further help to you on this! 

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. Remember, you can accept more than one post as a solution. If the content was useful in other ways, please consider giving it Thumbs Up.


    Thanks
    Andrew

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard