How to import/export data from section?

In this tutorial you will learn how to import data to section and how to export data from it.

If you don't want to create your own file to import you can use the 'data' attachment. It contains data used in the tutorial.

 

1.Raport form

Add a new table widget. Name it 'yearly_raport'. Columns name: time, sold (pcs.), value per piece and income. First three columns set as editable. Last three columns type change to 'number'. Choose 'allow add rows' option. The income will be value per piece multiplied by the amount of sold pieces, so in column D type a formula: =b*c.

Screen_Shot_09-27-18_at_09.47_AM.PNG

 

2.Average

2.a

Add a new spreadsheet section with two cells. In first type 'average income' and in second a formula that will calculate it, also change it's type to 'Number':

=sum(yearly_raport.D)/12

Screen_Shot_09-27-18_at_09.51_AM.PNG

2.b

We want the cells in column 'income' to change color based on the fact if the income in the cell is higher or lower than average. In order to do this we will use conditional formatting (read more here).

Create two styles: style1- for cells with income lower than average and style2 for those with income higher than or average.

Screen_Shot_09-27-18_at_09.58_AM.PNG

For 'income' column in style options choose 'compute style using formula'. 

Screen_Shot_09-27-18_at_10.02_AM.PNG

Put in 'style formula' field this formula:

=if(D>=SECTION2.A2,'style2','style1')

 

3.Workflow

Add workflow actions widget. Go to workflow tab and add one state 'sent' and one action 'send raport'. Add yourself as the app creator and save changes.

Screen_Shot_09-27-18_at_10.04_AM.PNG

 

4.Import/export

Now, run your app. The table should only have one empty row.

Screen_Shot_09-27-18_at_10.07_AM.PNG

Right-click on the table and choose 'import from excel/.csv'.

Screen_Shot_09-27-18_at_10.10_AM.PNG

Choose the file with your data. The data will fill the table by matching column names: A to A, B to B and so on. Based on the imported data the app should calculate the income and colour the cells. 

Screen_Shot_09-27-18_at_10.12_AM.PNG

Now, that the needed calculations were made we can export our data by right-clicking the table and choosing the 'export to .csv' option.

Screen_Shot_09-27-18_at_10.14_AM.PNG

 

Have more questions? Submit a request

0 Comments

Article is closed for comments.
Powered by Zendesk