Is there a way to order the columns in a form, dynamically?

I have a dynamic form, where the contents vary depending on the template chosen. However I would like to order the columns according to a sequence number held in the template; rather than manually re-order the column-order when building the app.

I.e. so the column order is data-driven rather than hard-coded.

Is this possible?

See screenshot below of one of the templates.

1 8 589
  • UX
8 REPLIES 8

Steve
Platinum 4
Platinum 4

Nope.

No. The closest you could come would be to create a view for each template, assuming ach template has a set column order, and then in the app navigate to the view based on the chosen template.

Hi @WillowMobileSystems and @Steve thank you for your replies. Unfortunately each template has a different set of columns and each column can have its own different list of permitted values. So both the order, the number and type of columns vary and hence creating a different view for each template would not work.

Also the templates can be changed via the UI and any view created would quickly go out-of-date. It is a shame that the order items appear on a form cannot be data driven; since it is reading the data from a table, a simple SORT by column [Sequence] would do the trick. Everything else on the dynamic form works well.

Iโ€™m curious to know what kind of app and data you are dealing with. The approach you describe is extremely unconventional. It makes me wonder if maybe you are dealing with de-normalized data constructs and by applying a normalized structure you could solve your problem.

Hi @WillowMobileSystems the data is certainly structured and held in a relational database. Not denormalized at all.

The template defines financial products from the basic current account, debt-card, credit card to the more complex structured products, complex derivatives and more recently cryptocurrencies and digital assets.

Each โ€˜typeโ€™ of financial product has its own set of features. One way would have been to create โ€‹a dedicated table for each โ€˜typeโ€™ of product. E.g. one for Debt-cards and another for Credit cards etc. But that is too restricted and requires a model-change everytime a new โ€˜typeโ€™ of product is introduced or a new feature is added to the template.

A further complication is that some features have a different set of permitted values.

E.g Underlying asset permitted values changes based on the โ€˜typeโ€™ of product being defined.

So not an easy problem to solve, irrespective of the platform. Creating a dynamic form was seen as the lesser of two evils; unless I have totally missed something and happy to be enlightened.

I think youโ€™ll have the same problem with your current setup, where each individual feature is itโ€™s own column.

You might consider making a new Table, just for these Features, where each record is a single feature, linked to a single product type, and then you can include an ordering sequence.

Upon creation of a Product record, you can setup automatic child record creation for all related Features, then have the user fill out those child records individually.

It is sort of like an entity-attribute-value setup (EAV).

https://www.google.com/search?client=firefox-b-1-d&q=eav
https://community.appsheet.com/search?q=eav

Got it! I completely understand the complexity. I spent 15 years of my career writing Fixed Income Trading applications and market analysis tools for both Bond and Money Market side of the house. Not the same as what you are dealing with, I know, but the complexity is similar.

Unfortunately, while AppSheet is a flexible platform for probably 90% of the business applications out there, itโ€™s not a tool designed to provide the kind of data-driven decisions you seem to be looking for.

I think it could handle the products youโ€™ve described but there will need to be some trade-offs.

@WillowMobileSystems great to have someone who understands the nuisances of Financial Products.

The dynamic form solution we devised works very well. The down-side at present is the inability to order the appearance of fields on the form.

So for example:

in the Crypto world if you have token that is reliant on the ERC20 standard (e.g. Maker) , then you would want to call that out and that is also dependant on Ethereum, which is another Product. Our dynamic template can do this, but the Product element may not appear next to the ERC20 โ€˜featureโ€™ because the Sequence number we have cannot be used to order the elements on the form.

A nuisance we will just have to live with for the time being and one of trade-offs.

Top Labels in this Space