I'm trying to see if it possible to filter the results of a page/blog post field type by a specific page. The field should contain the list of pages within a directory page for the user to choose from. The issue is that there are multiple directories within the space so, while not hindering the end use of the form, it causes the user's search results to pull many more pages then desired. Also, this leaves the possibility for the user to choose an incorrect page (document type) within the field. This will help by removing entry validation for this field
An option could be to set up a web-service backed multi-select field in ConfiForms that is set to use the Confluence APIs, like https://developer.atlassian.com/server/confluence/rest/v900/api-group-child-content/#api-rest-api-content-id-child-get or https://developer.atlassian.com/server/confluence/rest/v900/api-group-search/#api-rest-api-search-get
I appreciate your help. Not quite sure how to implement something like that. I was able to pull a list of child pages from the directory in questions using rest api, but do you have any tips on how to format that into a useable multiselect field equivalent to a page multiselect field?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Recorded for you a little demo
Hope it helps
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That did it! This is exactly what I was looking for! I did have to make a slight change to the setup though to get my code to work. I put,
Service URL: /rest/api/content/<YOUR Page ID>/child?expand=page
Root: page.results
ID: _links.webui
Label: title
I also had to reference the data differently than with the page/blog post field type. I had to use [entry.webservicefield.id.pageProperties(PROPERTY)] to extract the property values from the user selected pages.
One thing I noticed before this is that the iterateAndPrint virtual function only needs to be used on one confiforms rule and then you can reference the multiselect field without using iterate function. I don't know if this is proper, but it cuts down on string length.
Thank you so much for all your help!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.