cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
Frequent Visitor

Dynamically add fields from a table into a form

Hi everyone,

 

Is there possible to have a table in the database with the name and the type of the fields that can be dynamically added to a PowerApps form? For example I have the following table:

DynamicFields0.JPG

I need to add these fields dynamically on a PowerApps form, to look like this:

DynamicFields1.jpg

And if I add another field to the table, let’s say FieldName = “Gender” and FieldType = DropDown, the form should look like this:

DynamicFields2.jpg

Is there any way to add the fields dynamically?

 

Thank you!

 

 

2 REPLIES 2
Highlighted
Dual Super User II
Dual Super User II

Hi @lstan 

 

PowerApps is not designed for dynamically built forms (atleast not where the product is today)

You can have a form pre-created and then show hide but you would need the components setup

 

You could create a collection with all control types and then show and hide depending upon what value is returned from database but that would be an overkill and not ideal in terms of performance either

 

Regards,

Reza Dorrani

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

 

 

Highlighted
Community Support
Community Support

Hi @lstan ,

Could you please share a bit more about your scenario?

Do you want to add fields into a Edit form dynamically?

 

If you want to add fields from your data source into a Edit form dynamically, I afraid that there is no way to achieve your needs in PowerApps currently.

 

If you would like this feature to be added in PowerApps, please submit an idea to PowerApps Ideas Forum:

https://powerusers.microsoft.com/t5/PowerApps-Ideas/idb-p/PowerAppsIdeas

 

As an alternative solution, you could consider enable all fields from your data source within your Edit form, then control the corresponding field data cards visible based on specific condition.

Please check the following thread for more details:

https://powerusers.microsoft.com/t5/Building-PowerApps-Formerly/visibility-of-datacards-based-on-a-r...

 

If you want the new added in your table to be displayed within Edit form, I afraid that there is no way to achieve your needs in PowerApps currently. Actually, it is an known issue within PowerApps -- the changes you made within data source would not take effect within PowerApps app immediately. As an fixed solution, you need to refresh the data source manually in your app, then the changes would take effect.

 

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.

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

News & Announcements

Community Blog

Stay up tp date on the latest blogs and activities in the community News & Announcements.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Community Highlights

Community Highlights

Check out the Power Platform Community Highlights

Top Solution Authors
Top Kudoed Authors
Users online (7,339)