# Text Analysis - Save Variable(s) - First Category

Save a variable to the data set containing the first category mentioned. Where there are multiple input categories, the first category of each will be saved as a separate variable.

This QScriptfeature saves the first categories from a Insert > Text Analysis > Automatic Categorization > List of Items/Unstructured Text/Entity Extraction or Insert > Text Analysis > Advanced > Setup Text Analysis output as a Pick One or Pick One - Multi questionNominal or Nominal - Multi variable set.

## Technical Details

The variables created from this QScriptfeature may become invalid and need to be deleted and recreated if the output from Insert > Text Analysis > Automatic Categorization > List of Items/Unstructured Text/Entity Extraction or Insert > Text Analysis > Advanced > Setup Text Analysis has changed, either due to the input text variable being modified or the input settings modified.

This QScript requires version 5.5.1 to be executed.

## Code

includeWeb('QScript Functions for Saving Text Analysis Variables');

saveTextAnalysisVariables('Save Variable(s) - First Category');