This content is also available at learn.palantir.com ↗ and is presented here for accessibility purposes.
📖 Task Introduction
Use the Live Preview feature to test the function you just inserted into your code editor.
🔨 Task Instructions
Ensure your Code Assist is running and select the fx Functions tab in the helper toolbar along the bottom of your screen. Then, open the Live preview tab of the functions helper.
If your code is error-free, you’ll see your named Function in the list. Click on it to reveal the test UI on the right.
If your Function name isn’t showing up in the list, ensure your code is not presenting any errors. Otherwise, restart Code Assist and/or refresh your browser.
Select the Alerts search field and choose Select all 30. This will provide a sample array of 30 of your flight alert object into the function and return the output.
Select Run ▶ to test the function.
Look below Run ▶ to view the results of your test. Your result should be 0.366 recurring - indicating that 36.6% of the 30 alerts are unresolved. Remember that you are dividing the number of results by the length of the provided array of alerts; a value of 1 means every alert in the array met the criteria in your for loop.