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);
"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?
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.
You can also chat with me via my Drift chat profile:
Product Engineer, Power Scripts
- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events