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:
and the instant I paste that into the Items property of the gallery, my dynamic form generates.
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

Report
All responses (
Answers (