Is it possible to filter a confiforms page/Blog post field by more than just space?

Kevin Kott September 10, 2024

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

1 answer

1 accepted

1 vote
Answer accepted
Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 10, 2024
Kevin Kott September 10, 2024

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?

Alex Medved _ConfiForms_
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
September 11, 2024

Recorded for you a little demo

Hope it helps

Like Kevin Kott likes this
Kevin Kott September 11, 2024

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!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events