Script examples
Last updated
Last updated
#FlowScript #Join #If statement #For loop #With #Table concatenation #Create table
This script creates a new table and fills it with data from an already existing table, where one column will be updated with new data.
DS_periodDates
DS_favorites
Description:
A new table is created: generatedFavorites (row 1 in script below)
The script will loop for every row in table DS_periodDates (3) where the date is in the future and the day status is like '%hours left to report' or 'Reported' (5)
The script will loop for every row in table DS_favorites (7) where the account date in DS_favorites will be updated with the date from DS_periodDates (9)
The script adds the result from each loop iteration to generatedFavorites by concatenating the row with table addedFavs (11)
The script returns generatedFavorites (19)
generatedFavorites:
#FlowScript #Join #If statement
This script joins values and assigns the values to new variables.
#FlowScript #Join #Loop #For loop #Create table
This script will create a simple table where for example join is used to join all components together into one string so all values can be put into one column.
The input table blockerBugsFiltered is a complex table with different levels of tables, records and simple values in the table.
Description:
A new table is created: blockerBugs (row 1 in the script below).
The script will loop for every row in table blockerBugsFiltered (3).
Join the values in the components table (5).
Append new records to table blockerBugs (7).
The script returns the table blockerBugs (12).
The output of this script will be a simple table including only simple values.
Script:
Description:
Create table variable stuff and add 7 rows of data (1-7).
Create variable t and select and sum values distinct from table stuff (9-12).
Return table t. In this case qt is subtract from qt (15).
Output data:
date
dayStatus
2019-12-01
Confirmed
2019-12-02
Reported
2019-12-03
3 hours left to report
2019-12-04
8 hours left to report
customerId
customerName
project
accountDate
3245
abc
4565
2019-12-01
2456
adc
5465
2019-12-01
5974
acb
4564
2019-12-01
customerId
customerName
project
accountDate
3245
abc
4565
2019-12-02
2456
adc
5465
2019-12-02
5974
acb
4564
2019-12-02
3245
abc
4565
2019-12-03
2456
adc
5465
2019-12-03
5974
acb
4564
2019-12-03
3245
abc
4565
2019-12-04
2456
adc
5465
2019-12-04
5974
acb
4564
2019-12-04