Hi Paul,
For the first part of your question, there is a method in the AppFramework QML type called createUuidString() which you can use to generate UUID/GUID strings.
string createUuidString() |
Creates a universally unique identifier (UUID) string; a 128-bit number to use as a way to identify a particular object or component. Without a defined format, defaults to using curly brackets and hyphens.
string createUuidString(int format) |
Creates a universally unique identifier (UUID) string; a 128-bit number to use as a way to identify a particular object or component.
For example,
var currentItemUuid = AppFramework.createUuidString(1);
var thisFilename = (currentItemFilename !== "") ? currentItemFilename + "_" + currentItemUuid : "export" + currentItemUuid;
The format parameter.
0 to include curly brackets and hyphens, e.g. {3F2504E0-4F89-41D3-9A0C-0305E82C3301}. 1 to include hyphens but not curly brackets, e.g. 3F2504E0-4F89-41D3-9A0C-0305E82C3301. 2 to not include hyphens or curly brackets, e.g. 3F2504E04F8941D39A0C0305E82C3301.
For the second part, what I understand is that you want to know if there are any downsides of using the system generated GlobalID itself and copying it to the custom GUID field. It doesn't seem to have any major downside, apart from the possibility that the same number in multiple columns might be confusing. The GlobadID surely is unique and the chances of any previous feature having the same Global ID are nearly non-existent.
Hope this helps.
Thanks,
Anshuman