Is there a way to easily copy an app, to reference another spreadsheet with identical column structure?
I have a few identical, and rather complicated spreadsheets, upon witch I build two different apps for different user types.
Is there a way to copy the “same” app to reference the other data?
I think what Aleksi is suggesting is that you do the following: 1. Open your app in the Editor 2. Go to the Data > Tables pane 3. Expand the table you want to update. 4. Click on “Source” and select “browse for more data” 5. This brings up a file open dialog where you can select the workbook you wish to use.
The new workbook and worksheet you select must be absolutely identical in format to the original one. This will cause AppSheet to use the new worksheet in place of the old one.
Correct me if I am wrong @Aleksi_Alkio
When you copy the app, it asks “Make a copy of the data for the new app”. If it’s ON, it will create an identical copy from your spreadsheet and it will start to use it as a source. If it’s OFF, it will use the same existing spreadsheet as a backend source.
@Aleksi_Alkio But is there a way to make the source of the copy another, existing sheet, that I have already made to have the exact same column structure?
Well… I haven’t tested but I believe in generally no.
Correct
If you are trying to move your app from one provider to another (Google Sheet to MySQL in your case), then you probably want to both copy your app and your data. That will essentially make a logical copy of your app on the new provider.
You can do this by: 1. Opening your current app in the Editor. 2. Going to the Manage > Author pane. 3. Clicking “Copy app” 4. Selecting the new provider (MySQL in your case).
@Philip_Garrett_Appsh oh! I feel stupid - thank you very much! Sorry @Aleksi_Alkio, it seems I just didn’t understand
No problem
Thank you @Philip_Garrett_Appsh, @Aleksi_Alkio I have a problem when “copy app”, I got this error:
Error Code: 1118. Row size too large. The maximum row size for the used table type, not counting BLOBs, is 65535.
This includes storage overhead, check the manual. You have to change some columns to TEXT or BLOBs
The table has many columns, but the SQL code generated is:
CREATE TABLE appsheet-data-MiClubAdminDB-326606_ComandasDetalle
( IDClub
VARCHAR(200) NOT NULL,
ID
VARCHAR(200) PRIMARY KEY,
IDTurno
VARCHAR(200) NOT NULL,
IDSesion
VARCHAR(200) NOT NULL,
IDComanda
VARCHAR(1024) NOT NULL,
Vaso
VARCHAR(1024) NOT NULL,
Modo
VARCHAR(1024),
TipoVaso
VARCHAR(1024) NOT NULL,
NroProductos
VARCHAR(1024) NOT NULL,
DetalleTexto
TEXT,
Column_11
VARCHAR(1024),
Tipo1
VARCHAR(1024),
Producto_1
VARCHAR(1024),
Cantidad_1
VARCHAR(1024),
Column_15
VARCHAR(1024),
Tipo2
VARCHAR(1024),
Producto_2
VARCHAR(1024),
Cantidad_2
VARCHAR(1024),
Column_19
VARCHAR(1024),
Tipo3
VARCHAR(1024),
Producto_3
VARCHAR(1024),
Cantidad_3
VARCHAR(1024),
Column_23
VARCHAR(1024),
Tipo4
VARCHAR(1024),
Producto_4
VARCHAR(1024),
Cantidad_4
VARCHAR(1024),
Column_27
VARCHAR(1024),
Tipo5
VARCHAR(1024),
Producto_5
VARCHAR(1024),
Cantidad_5
VARCHAR(1024),
Column_31
VARCHAR(1024),
Tipo6
VARCHAR(1024),
Producto_6
VARCHAR(1024),
Cantidad_6
VARCHAR(1024),
Column_35
VARCHAR(1024),
Cantidad
VARCHAR(1024),
Temperatura
VARCHAR(1024),
Consistencia
VARCHAR(1024),
Observaciones
TEXT,
Precio
DECIMAL(15, 2) NOT NULL,
Costo
DECIMAL(15, 2),
Puntos
DECIMAL,
FechaHora
DATETIME NOT NULL);
I think the generator of these SQL core by default select varchar(1024), can you help me to reduce the size of these autogenerated types? Translate
All these vars varchar(1024) are enum type in my appsheet project
The error message indicates that the data values in one of your rows is too long to fit in the MySQL record. Please check the actual length of the data contained in your “TEXT” columns. One or both of these fields may contain long data values.
@Philip_Garrett_Appsh I was investigating and the problem is not in the data length (verified, my data is by far shorter) is in the structure of the data (means the SQL generated when copy the app). By default the sql appsheet script generator assign 1024 to VARCHAR vars.
I tried to set MaxLength parameter (on Edit column definition) but it only works when type var is Text, but not when is REF or ENUM. Who can I consult about? Thanks
Then you need to change the source file… Data > Tables > Choose the table > Change the source
@Aleksi_Alkio I’ved tried that, but it still seems to be quite a hassle… If it’s not possible to do an easier way, I would like to suggest the feature for future updates
May I ask why it’s “quite a hassle”?
What about using Private Tables here?
@Aleksi_Alkio When I delete the “old” data, to replace with the new, a lot of my presets fail, and must be individually pointed at the new data to work again. Same goes for workflows and slices…
@Stephen_Mattison I don’t think I understand you fully? What is a private table, and how would it be useful in this case?
IF your sheets are totally identical like column names and types are the same, it should not need any additional work. I have done that few times and it has worked quite easily.
@Aleksi_Alkio does it also work when changing the source from Google sheets to MySQL database?
Unfortunately no
User | Count |
---|---|
43 | |
32 | |
25 | |
23 | |
14 |