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

(Yossi Oulu) #1

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…

(Praveen Seshadri (AppSheet)) #2

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.

(Yossi Oulu) #3

@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)

(Praveen Seshadri (AppSheet)) #4

I agree. We hope to be able to move the position of virtual columns “in-between” the other columns.