diff --git a/site/sigmaguides/src/Fundamentals 6: Controls - v3/assets/fcontrols_1.gif b/site/sigmaguides/src/Fundamentals 6: Controls - v3/assets/fcontrols_1.gif index c5c07ef5..6e1d2685 100644 Binary files a/site/sigmaguides/src/Fundamentals 6: Controls - v3/assets/fcontrols_1.gif and b/site/sigmaguides/src/Fundamentals 6: Controls - v3/assets/fcontrols_1.gif differ diff --git a/site/sigmaguides/src/Fundamentals 6: Controls - v3/assets/fcontrols_20.png b/site/sigmaguides/src/Fundamentals 6: Controls - v3/assets/fcontrols_20.png index c31765ac..234783b8 100644 Binary files a/site/sigmaguides/src/Fundamentals 6: Controls - v3/assets/fcontrols_20.png and b/site/sigmaguides/src/Fundamentals 6: Controls - v3/assets/fcontrols_20.png differ diff --git a/site/sigmaguides/src/Fundamentals 6: Controls - v3/fundamentals_6_controls.md b/site/sigmaguides/src/Fundamentals 6: Controls - v3/fundamentals_6_controls.md index 8dd2ea7d..07f560e0 100644 --- a/site/sigmaguides/src/Fundamentals 6: Controls - v3/fundamentals_6_controls.md +++ b/site/sigmaguides/src/Fundamentals 6: Controls - v3/fundamentals_6_controls.md @@ -27,7 +27,7 @@ To read more about [creating flexible reports with parameters, see here.](https: If you already completed QuickStart fundamentals 1-5, you have already used controls. -In [Fundamentals 2 - Data](http://localhost:8000/guide/fundamentals-2-data/index.html?index=..%2F..index#2), we created a filter directly from a table column (Store Region), and converted that filter into a page control. This control is an example of a `List control`. +In [Fundamentals 2 - Data](https://quickstarts.sigmacomputing.com/guide/fundamentals_2_data_v3/index.html?index=..%2F..index#2), we created a filter directly from a table column (Store Region), and converted that filter into a page control. This control is an example of a `List control`. Selecting the correct control is often more art than science, as there are many controls to choose from. @@ -294,7 +294,7 @@ Also notice that the `DATA SOURCE` indicates `+ 1` to let us know that there is ### Add the switch control -Add a `Switch` control to the page, rename it `Transaction Type` and set it's `Control ID` to `f6-c-switch-transaction-type`. +Add a `Switch` control to the page, rename it `Transaction Type` and set it's `Control ID` to `f6-c-switch-transaction-type` and the `Filter Type` to `True/False`. We can now toggle the switch control on and off, but the table is "aware" of it yet. @@ -303,43 +303,20 @@ We need to make the table respond to this controls value, as it is changed. Add a new column next to `Transaction Type`, rename it to `Switch`, and set its formula to: ```code -If([f6-c-switch-transaction-type], If([Transaction Type] = "Purchase", True, False), [Transaction Type] = "Return", True, False) +Switch([Transaction Type], "Purchase", True, "Return", False) ``` +You can also change the control labels under `Format` > `LABEL` to replace On/Off with Purchase/Return. + -#### How It Works in Detail: -
  • When [f6-c-switch-transaction-type] is TRUE: - -
  • -
  • When [switch-example] is FALSE: - -
  • - - -The last step is to add a table filter on the `Switch` column so that it responds to changes from the control. - -Be sure to select only the True value, as that is what the control should be set to while we create this filter. - - - - +In the switch controls configuration, add the `PLUGS_SALES` table as a `TARGET` and select the `Switch` column under that. Now we can toggle between `Purchase` and `Return` transactions: