You could do this in a couple of ways depending on how many times you wish to get a unique ID.
1. If you only wish to get one unique ID for each use of the PlanetPress Design document, then I would create the GUID using the %U variable in workflow and store that into a local variable which you pull through to the template using:
=ExpandString('%{MyVariable}')
You could of course shortcut this and go straight to
=ExpandString('%U') but it's better practice to see what you're doing and create it in workflow first.
2. If you need multiple GUIDs, then I would consider using an external script to create one. You could do this by calling an external VBScript or JScript or similar by making use of the
execscriptfile function. More information on this is available
here.
NB: I would make the call to this external script inside a condition which filters the printermode so that you're not constantly requesting GUIDs in design mode. Each time anything is clicked or moved in Design, the whole document runs through as if triggered.For example:
if(&printermode <> 0)
<execute your script>
endif()
More information is available on printer modes
here.
Note: For those who can enlighten me - I wasn't sure how the workflow would behave for multiple calls of the same system variable (i.e. %U) - I couldn't be sure whether it would give you the same GUID or multiple GUIDs without testing.Hope this helps.
Regards,
James.