I have a form which documents business capabilities at different levels. L1 is the highest level and L4 is the most granular level. Lower levels always have parent capabilities (f.x. an L3 capability has an L2 and an L1 parent capability).
For an L3 capability the following fields must be filled in:
type: L1, L2, L3, L4 (dropdown)
name: text
description: text
L2 parent: smart multiselect [name]
L1 parent: smart multiselect [name]
Now, I would like the L2 parent field not to fetch all names but only the ones from form entries where the value of type is "L2". How can I apply such a filter to the multiselect field?
Furthermore, when I select one of the available L2 parent names, I would like the L1 parent field to automatically copy the L1 parent name from the L2 parent entry we are referencing here.
I have thought about creating different forms for each Capability Level but was hoping there is a way to do this in a single form. Does anyone have an idea? @Alex Medved _ConfiForms_
Not fully understand the setup and the requirements, but to apply filter on field rule should be as easy as having the filter to be
type:L2
Setting parent should also be possible - if you really want to copy the values... note that you can always reference through smart fields the fields from a record that they are linked to
But to set the values would be something like
L1parent=[entry.L2parent.transform(L1parent).asList]
Alex
Hi @Alex Medved _ConfiForms_ ,
thanks for your response. I can't seem to get this to work.
1. Is the filter "type:L2" to be set in the field definition settings? I don't see any filter option there.
2. I tried setting up a lookup and set value IFTTT rule where:
With these settings however when the condition type:L3 is met, the L1 Parent field is populated with all L1 Parents and not only the ones that are related to the earlier selected L2 Parent. Any ideas on what I am doing wrong?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Sorry to say, but I was trying to explain something completely different - again, it might be that I dont understand the whole configuration that you have... but let me show one video
Configuration (note that you will need to reconfigure the smart fields)
<ac:structured-macro ac:name="confiform" ac:schema-version="1" ac:macro-id="0a424555-4a35-4679-8052-95eb4ba34ef4"><ac:parameter ac:name="formName">form</ac:parameter><ac:rich-text-body><p><ac:structured-macro ac:name="confiform-field-definition" ac:schema-version="1" ac:macro-id="b429299b-8404-489c-9c1f-10a4c96229a1"><ac:parameter ac:name="fieldName">type</ac:parameter><ac:parameter ac:name="fieldLabel">Type</ac:parameter><ac:parameter ac:name="values">false[L1=L1|L2=L2|L3=L3|L4=L4|]</ac:parameter><ac:parameter ac:name="type">select</ac:parameter><ac:parameter ac:name="required">true</ac:parameter></ac:structured-macro></p><p><ac:structured-macro ac:name="confiform-field-definition" ac:schema-version="1" ac:macro-id="31025634-7640-4e9a-bb49-ccdbf6840622"><ac:parameter ac:name="fieldName">name</ac:parameter><ac:parameter ac:name="fieldLabel">Name</ac:parameter><ac:parameter ac:name="type">text</ac:parameter><ac:parameter ac:name="required">true</ac:parameter></ac:structured-macro></p><p><ac:structured-macro ac:name="confiform-field-definition" ac:schema-version="1" ac:macro-id="cf29dcb6-5835-4f09-8541-4327d2b5d433"><ac:parameter ac:name="fieldName">description</ac:parameter><ac:parameter ac:name="fieldLabel">Description</ac:parameter><ac:parameter ac:name="type">text</ac:parameter></ac:structured-macro></p><p><br /></p><p><ac:structured-macro ac:name="confiform-field-definition" ac:schema-version="1" ac:macro-id="bc17e323-0672-4e13-a348-00af3603addf"><ac:parameter ac:name="fieldName">L2Parent</ac:parameter><ac:parameter ac:name="fieldLabel">L2Parent</ac:parameter><ac:parameter ac:name="values">[215351311|form|name|true||]</ac:parameter><ac:parameter ac:name="type">smartmultiselect</ac:parameter></ac:structured-macro><ac:structured-macro ac:name="confiform-field-definition-rules" ac:schema-version="1" ac:macro-id="394c74e5-d2a9-42a7-a813-3a0c36b9b917"><ac:parameter ac:name="fieldName">L2Parent</ac:parameter><ac:parameter ac:name="values">type:L2</ac:parameter><ac:parameter ac:name="action">Apply Filter on a field</ac:parameter></ac:structured-macro></p><p><ac:structured-macro ac:name="confiform-field-definition-rules" ac:schema-version="1" ac:macro-id="8b5ef875-8ef9-4a68-ad79-3651a9c1c9e4"><ac:parameter ac:name="values">L1Parent=[entry.L2Parent.transform(L1Parent.transform(id).asList).asList]</ac:parameter><ac:parameter ac:name="action">Set value</ac:parameter><ac:parameter ac:name="actionFieldName">L2Parent</ac:parameter></ac:structured-macro></p><p><br /></p><p><ac:structured-macro ac:name="confiform-field-definition" ac:schema-version="1" ac:macro-id="4ffc2bea-e48b-4eaa-ae0c-724593525c38"><ac:parameter ac:name="fieldName">L1Parent</ac:parameter><ac:parameter ac:name="fieldLabel">L1Parent</ac:parameter><ac:parameter ac:name="values">[215351311|form|name|true||]</ac:parameter><ac:parameter ac:name="type">smartmultiselect</ac:parameter></ac:structured-macro> <ac:structured-macro ac:name="confiform-field-definition-rules" ac:schema-version="1" ac:macro-id="d7839237-b76d-492b-bddf-a6eab5ec569d"><ac:parameter ac:name="fieldName">L1Parent</ac:parameter><ac:parameter ac:name="values">type:L1</ac:parameter><ac:parameter ac:name="action">Apply Filter on a field</ac:parameter></ac:structured-macro></p><p><br /></p><p><br /></p><ac:structured-macro ac:name="confiform-entry-register" ac:schema-version="1" ac:macro-id="c689e1da-f375-4660-8fe6-5a79d9b9c3c2"><ac:parameter ac:name="type">Embedded</ac:parameter><ac:rich-text-body><p><br /></p></ac:rich-text-body></ac:structured-macro><p><br /></p></ac:rich-text-body></ac:structured-macro><p><br /></p>
May be it will give you some ideas
Alex
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi @Alex Medved _ConfiForms_ ,
thanks for your help on this. Both solutions work perfectly.
One more question: Is there a way to create a field expression that will fetch all names of L2 capabilities that have the current entry's name selected in the L1 Parent field and display that as clickable links? (for each entry a page an IFTTT rule creates a page appending the "name" value to our domain) The idea here is to show which lower level capabilities belong to an L1 capability. The field should sit in a table.
I thought sth. like this might work but it doesn't:
entries.iterateAndPrint([entry.L1Parent.equals([entry.name]).asEntryRef(entry.name).prepend(https://confluence.ourdomain/).asLink([entry.name]).addCRLFHtml])
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Not on the form view I afraid. Later on the view it might be possible
Should be something similar to
L1Parent.iterateAndPrint([entry.name.prepend(https://confluence.ourdomain/)].asLink)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Alex Medved _ConfiForms_ Got it, thanks.
I just noticed that whenever I want to edit an existing form entry, the multi select fields are being emptied (see screenshot). I suspect that is a side effect of the field definition rule below:
l2Parent=[entry.l3Parent.transform(l2Parent.transform(id).asList).asList]
Therefore I tried setting a condition that will only execute the rule when [l3Parent] is not empty.
[entry.l3Parent]=![empty]
However, having that condition in place seems to interfere with the automatic selection of higher level parents. Do you have any idea how this may be fixed?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
!l3Parent:[empty]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Or, make the rule to react only on user action - meaning that it will trigger only when the user does something (selects an option) and will not trigger on the form load
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.