How to modify data?

Data in base is stored in lists and data tables.

In this tutorial you will learn how to add, change or delete base data using an app.

For this app we will use an already existing list 'Countries_list' which contains data about different European countries ( You can copy it here).

 

1.Project

1.a

Create a new app. Add two widgets: a spreadsheet and a table. Bind the table with 'Countries list'. Drag list fields to the table.

1.b

Hide 3 last columns by putting =false in visibility field. In spreadsheet delete all of the columns except one. 

 

1.c

In first cell of the spreadsheet write 'Add, modify or delete data' and bold this text.

Screen_Shot_09-21-18_at_12.22_PM.PNG

1.d

 

In all rows fill 'data field' field with names of 'Countries_list' fields :

country, capital, population, group.

Set cells as editable. 

Screen_Shot_09-21-18_at_12.38_PM.PNG

1.e

Bind the spreadsheet section with the table using lookup formula in 'Filter' field.

Screen_Shot_09-21-18_at_12.40_PM.PNG

Next, bind spreadsheet cells with table columns by putting the equals sign and column name:

Screen_Shot_09-21-18_at_12.43_PM.PNG

1.f

 

Change the A4 cell type (the one with population data) to 'Number'.

In cell options in 'data field' add list fields names the same way as you did in the table.

 

2.Workflow

2.a

Add workflow actions widget. Go to workflow tab and add a new action there. It should begin and end in 'Start'. Name it 'Add or modify'.

Screen_Shot_09-21-18_at_12.49_PM.PNG

 

Thanks to this action we will be able to add new rows to the list or modify them.

Every list contains unique values that defines a certain row - we call them keys. In our case 'Country' is a key. If we add a new country or modify an already existing country name we will automatically add a new list row. If we change any other field we will change information about the country.

2.b

Add 'save to database' actionstep. Put in the correct fields your spreadsheet name and list name.

Screen_Shot_09-21-18_at_12.57_PM.PNG

2.c

Add one more action that begins and ends at the start. Name it 'delete' and add 'delete from database' actionstep to it. In options fill spreadsheet section name.

Screen_Shot_09-21-18_at_01.01_PM.PNGScreen_Shot_09-21-18_at_01.01_PM_001.PNG

2.d

To both actions add 'refresh page' actionstep. It will cause the page to refresh after any data change.

Screen_Shot_09-21-18_at_01.06_PM.PNGScreen_Shot_09-21-18_at_01.05_PM.PNG

 

3.Running the app

Add yourself as the app creator and save the app. Now run it and see how it works.

Now we will delete Norway from the list:

Screen_Shot_09-21-18_at_01.11_PM.PNG

After clicking the button the page automatically refreshed. Now Norway is not on the list anymore.

Screen_Shot_09-21-18_at_01.12_PM.PNG

Let's add Norway back. We need to put all of the country information manually. Now Norway is back on the list. 

Screen_Shot_09-21-18_at_01.16_PM.PNGScreen_Shot_09-21-18_at_01.17_PM.PNG

 

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk