How to prevent empty fields in a variable (part number) of a file?

How to prevent empty fields in a variable (part number) of a file?

I would like to do as a condition in the workflow but I do not know the syntax

SolidworksSolidworks Pdm enterprise Pdm