What is the reason for not being able to choo...

What is the reason for not being able to choose the order of the fields in a Form? Why is it required to create a Slice to do that? This adds complexity, as now you have to deal with more views, and more related fieldsโ€ฆ

0 3 408
3 REPLIES 3

The short answer is that this is because we traded off simplicity in the basic case for cleanness in the complex case.

Ideally, there should be a storage โ€œschemaโ€ and a presentation โ€œschemaโ€. For simplicity (and in keeping with the starting point of spreadsheets that combine the two), we have opted to go with a single schema โ€” the column structure.

Now there are various consequences of this decision that arenโ€™t so clean:

a) some presentation things (eg: ShowIf) leak into the โ€œstorageโ€ schema

b) column order for presentation is tied to column order for storage

Now, you can re-order columns in most views. We didnโ€™t want to do that for forms because there is often order-dependent logic in a form โ€” eg: when things are recomputed, conditional logic in show-ifs, etc.

So if someone really wants to, we let them reorder via a Slice, and work thru the issues that might arise with a change in the column order.

Separately, for some data sources like Salesforce and DYnamoDB where there is a very significant difference between storage structure and presentation structure, weโ€™ve introduced a mechanism in the Table definition to reorder/filter the columns.

So thatโ€™s the long answer.

@praveen

Thanks for the long answer. The point is that I find it hard to believe that one can build a meaninfull app without the need for few virtual columns which must be placed in some specific order. So for most of the users this is extra complexity (not for the trivial demo)

I agree. We hope to be able to move the position of virtual columns โ€œin-betweenโ€ the other columns.

Top Labels in this Space