A super helpful type of blaze would be one that can generate and insert a unique identifier. For example, in my s/w development work I frequently want to generate and assign a short identifier for artifacts / documents. For use cases, I currently have to generate (in Google Sheets) a number of UC##: identifiers that I cut and paste in front of a use case name (like "UC09: edit property"). Similarly for Requirements (R005:), Architectural points (A103:), and many others
The key is for the user to customize the prefix (eg "UC" or "R" or "A"), and the number of digits (e.g. 2 for up to 100 use cases, 3 for up to 1000 requirements). Text Blaze would sequentially generate the zero-padded digits after the prefix. Then the user can assign a shortcut (e.g. "/uc" for use case). This would be a HUGE time saver over pre-generating the unique identifiers in a spreadsheet and then cutting and pasting into a document.
I'm a paid user of Text Blaze and would love to have this capability -- would help me stay a paid user.
@user635 You can use the current time in milliseconds to guarantee uniqueness.
Current time in milliseconds: {time: X}
If you do not want such a large integer, we will have to store an integer value (initially set to 0), and then update it by one each time it is used. Currently, this data storage feature is not available in Text Blaze but we are working on a feature to make it available. I will be able to give you more details by latest next week
The snippet is below. For it to work, first you need to set the value of space=CHANGE_ME to the space ID, which you can get from the URL https://dashboard.blaze.today/space/SPACE_ID/table/TABLE_ID/
{note}
{dbselect: SELECT Prefix, Count FROM IdentifierGeneration ORDER BY Count DESC; space=CHANGE_ME; menu=yes}{if: prefix == "CREATE NEW"}{use_count=1}Type new prefix to add: {formtext: name=use_prefix}{else}{use_count=count+1}{use_prefix=prefix}{endif}
Visual padding: {formtext: name=padding_count}{padded_use_count=base(use_count, 10, padding_count)}
{endnote: trim=yes}
{=use_prefix}{=padded_use_count}
{if: prefix == "CREATE NEW"; trim=yes}{dbinsert: INSERT INTO IdentifierGeneration SET Prefix=@use_prefix, Count=@use_count; space=CHANGE_ME; autoaddfields=no}{else}{dbupdate: UPDATE IdentifierGeneration SET Count=@use_count WHERE Prefix == @use_prefix; space=CHANGE_ME; autoaddfields=no}{endif}
Then you can copy and paste this snippet into your Text Blaze dashboard snippet editor. In the preview, you will see: "Invalid Data Blaze query - Cannot use a DB command with this query. You can reconfigure the folder to allow access - Configure folder". Press "Configure folder" to allow the snippet to access your space.
Once this is all done, the snippet should work pretty much exactly as you have described
Please let me know if you face any issues. This is a new beta feature and we can't wait to see the advanced use cases our users build on top of it!
I am getting an error message when I try to Configure folder.
An issue occurred while saving. If this issue persists, please report it to support@blaze.today.