In this tutorial you will learn how to use section refreshing options.
We will show section refreshing by a simple data searching app.
First, create a new list. It will be a list containing information about different countries from all around the world. You can use data from the table below.
|Australia||Australia & Oceania||very high||24511800|
|Canada||North America||very high||36708083|
|Indonesia||Australia & Oceania||medium||261989000|
|South Korea||Asia||very high||51454000|
|USA||North America||very high||326079000|
Name the table fields as below and choose accurate types for them.
Add a new spreadsheet section with two columns. Fill it as below and B1 cell bind with 'continents' field from countries list by dragging it from the 'data' tab, list 'world_countries'.
Add a new table section and bind it with the list of countries by finding the list in 'data' tab and dragging it to the section. Next table columns bind with list fields by dragging field names to the columns. Change column headers as below.
We want the table to view information about all countries from the chosen continent. That is why we need to fill the lookup formula for our table with search criteria.
Add workflow actions widget.
Let's create a simple workflow. It will consist of two states: 'sent' and 'accepted' and two actions: 'send' and 'accept'.
On enter to 'sent' state add 'set editors' actionstep. In it add yourself as the editor.
a) after change
It's a default refresh mode.
In our case this will mean that the table section will refresh after change of continent in spreadsheet section. Even after editing the country data in the countries list the refresh will not happen. It also means that the section will not refresh after changing the state.
Data in the table changed only after changing the continent in the spreadsheet.
Set the 'always' refresh mode for the table. It means that the data in our table changes both after changing the continent and after changing the data in the countries list.( we can notice the list data changes after opening the app again).
Next, add one european country to the list.
In the next state the added country is visible:
The manual mode is useful when we have a couple of search criteria e.g. beside the continents we also have the level of the development. If we want to first fill in the search criteria and then get search results this mode is the best choice for us.
So now let's add a second search criteria. In next row of the spreadsheet type 'choose level'. Bind the B2 cell with 'level of development' field from countries list.
Next, to the table lookup formula add the search criteria connected with the level.
=LOOKUP(world_countries,continent=SECTION1.B1 && level_of_development=section1.b2)
To be able to use the manual mode add the button widget. Name the caption 'search' and add 'rebind sections' actionstep. In 'sections' field type section2 - the table section.