New to Confluence - so thanks in advance for any info (or redirection to documentation) that anyone can provide.
When setting values using Confiforms Rules for Field Definition, how can I perform string functions? Is there any documentation?
e.g. in my Values to Set:
IssueDescription=[entry.original_description]
I want to perform a substring, possibly using regular expressions, on the original description.
Thanks again!
Hi @Dan
You can see what functions are available in ConfiForms here - https://wiki.vertuna.com/display/CONFIFORMS/Virtual+functions
Alex
Thanks - it seems that the string manipulation functions are very minimal? Any thoughts on how I could readily extract the third word or phrase from the below string using virtual functions?
|Foo|Bar|Bah - I want this piece|Bat|
Thanks again!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can always have a custom call to a JavaScript function if you are using the server/dc version and JavaScript support is not disabled by your admins
Here is a demo with "minimal string manipulation functions" - http://recordit.co/jEk8c627Hs
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Yes, I'm exploring that front too. The string manipulation part is easy, but the impediment I'm hitting on that side is that I don't know how to set all types of ConfiForms Form Field Definitions from javascript. I can set (and query) using:
AJS.$('#' + formId).find('#i_fieldToUpdate').val(valueToSet)
The above works for "text" and "textarea" field types, but the val() function seems to not work for the "Jira Issue" or "Dropdown" types. Which is ultimately what I'm trying to get to. Is there a list of AJS javascript functions and what they return for each field type? Or am I taking the wrong route there and there's a better javascript way?
Thanks yet again!
ps. I can't follow the recordit dot co link from inside work, but I'll check it out later.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can use cfSetValue function as explained in https://wiki.vertuna.com/display/CONFIFORMS/ConfiForms+Field+Definition+Rules#ConfiFormsFieldDefinitionRules-RuncustomJavaScript
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Third impediment: cfSetValue, cfSetValueWithEventPropagation, cfAddFieldRequired, etc. absolutely do not work :D. I have a ticket in with our Atlassian tooling group to see what's up. Thanks again for all your suggestions and time!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The only reason I can think of functions "absolutely do not work" is that you are using some old version of ConfiForms plugin or your admins have disabled support for JavaScript functions
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Follow-up: Our production version of ConfiForms is indeed old - like positively ancient. Enablement is currently moving a more current version through performance acceptance testing and the code (and everything else discussed above) works great in the PAT environment. Thanks for your help :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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.