Best answer

To record data that you have generated with a Custom Script action, you will want to use the sgapiSetValue() function. This function allows you to set the value of a field, whether that’s a Textbox question or Hidden Value action.

Once you have stored your data in a field, it will then be available for reporting and exporting.

To learn more about this function and see a few examples of its use, check out the tutorial below

Reports provide data for survey questions or hidden elements. The best option to have the script result in a report is likely to output the result of your script into a question or hidden value so that it is stored as an answer on the survey.