I want to add the first letter of the page title as label to that page, using PowerScripts for Confluence.
The script I have is file setFirstCharacterPageTitleAsLabel with code:
number pageId = id;
string newLabel = substring(pageId.title,0,1);
addLabels(pageId, newLabel);
return
"id: " + pageId,
"title: " + pageId.title,
"label: " + newLabel;
On the page I put the 'Sil script' macro as follows:
But as you can see I immediately get an error. What am I doing wrong?
Hello Patrick,
I copied your script exactly as you have posted and it works perfectly according to the parameters as you described. The only way I could reproduce your error was to intentionally misspell the name of the sil script, "setFirstCharacterPageTitleAsLabel.sil". Please check the spelling of the script or copy and paste the name directly from the SIL Manager. If you would like additional help, please stop by the support chat room found anywhere in the Power Scripts for Confluence documentation.
https://confluence.cprime.io/pages/viewpage.action?pageId=32815950
You can also chat with me via my Drift chat profile:
https://drift.me/hyrumsteffensen
Regards,
Hyrum Steffensen
Product Engineer, Power Scripts
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.