Yay!!!!!!!!!!!!!! I am really excited to see the Spring 23 releases enhancement of the “Input widget” Reference in SAQL features. Now no need to scratch the head anymore to write bindings in order to use the Input Widget.
please refer to the below link for the detailed article
Earlier we would need to write a binding to pass the output of input widget to the Query/calculation. Now we could utilize the “Add input” functions directly to reference the Output from the Input widget in our Query.
Step 1
Once we setting up the Input widget and the respective Query. switch to the SAQL window where you could see the “Add Input” option on the Top.
Step 2
click on the “Add Input” option to select the appropriate input widget for the calculation.
Step 3
Add the input widget in the formula/ calculation in the Query.
below is the final SAQL Query
q = load “sales_data_sample”;
q = group q by (‘ORDERDATE_Year’, ‘ORDERDATE_Month’);
q = foreach q generate ‘ORDERDATE_Year’ + “~~~” + ‘ORDERDATE_Month’ as ‘ORDERDATE_Year~~~ORDERDATE_Month’, sum(‘SALES’) as ‘sum_SALES’,sum(‘SALES’)*(1+[input_1]/100) as ‘calcfield’;
q = order q by ‘ORDERDATE_Year~~~ORDERDATE_Month’ asc;
q = limit q 2001;
Summary
Happy learning!!!!!!