This content is also available at learn.palantir.com ↗ and is presented here for accessibility purposes.
Once your semantically tagged function has successfully passed CI checks, it is ready for use in your Workshop module. In this task, you’ll configure a metric card to display the desired statistic.
In a new browser tab, open your flight alert Workshop module in Edit mode.
Select your Metric card: Avg Risk Score from the layouts panel.
In the metric card configuration on the right side of your screen, click the ⊕ Add metric button and then click into the Metric 2 block.
Set the first few values as follows:
Click into the Select numeric variable . . . field, choose ➕ New numeric variable, and then Function.
In the variable configuration window, rename the numeric variable from the default to [n] Percent Unresolved
.
Search for and select your Function in the Select a function . . . dropdown list. Check the name of your function in the code if you’ve forgotten it.
You need to define an array of flight alerts as the required Function inputs. In the Function inputs section, under Alerts, choose [o] Filtered Flight Alerts
as the input variable. This will ensure the metric updates with any filters your users may select from the filter list.
Back on the widget configuration panel on the right, switch the Numeric Formatting toggle to the “On” position.
Change the Base type from Standard to Percentage.
Save and publish your module, then enter View mode to see your changes. Try adding a few filters to see how the new metric responds.