User (multi-select) field not evaluated in confiForms email macro body

Ralf Weidauer May 3, 2024

I want to send emails displaying the user names of a multi-select user field in confiForms.

I think I use exactly the (very simple) way explained on

How to reference a multi-select user values in IFTTT macro body 

Yet, when f.e. I enter three users the message I receive is

   $u.username $u.username $u.username

See storage format below.

 

<ac:structured-macro ac:name="confiform" ac:schema-version="1" ac:macro-id="4c557197-7092-42f6-bc5b-2d76e2958a75">
    <ac:parameter ac:name="formName">myForm</ac:parameter><ac:rich-text-body>
        <p><ac:structured-macro ac:name="confiform-field-definition" ac:schema-version="1" ac:macro-id="37c10edb-be78-445b-aa8f-599ee9edbfec">
                <ac:parameter ac:name="fieldName">usrLst</ac:parameter>
                <ac:parameter ac:name="fieldLabel">usrList</ac:parameter>
                <ac:parameter ac:name="type">multiuser</ac:parameter>
            </ac:structured-macro></p><ac:structured-macro ac:name="confiform-ifttt" ac:schema-version="1" ac:macro-id="b4563b08-fd97-4728-ad6e-5b9e095ed465">
            <ac:parameter ac:name="action">Send Email</ac:parameter>
            <ac:parameter ac:name="event">onCreated</ac:parameter>
            <ac:parameter ac:name="title">user list</ac:parameter>
            <ac:parameter ac:name="who">[owner]</ac:parameter><ac:rich-text-body>
                <p><code class="java plain">#foreach ($u in $usrLst) $u.username #end</code></p>
            </ac:rich-text-body>
        </ac:structured-macro>
        <p><br /></p>
    </ac:rich-text-body>
</ac:structured-macro><ac:structured-macro ac:name="confiform-entry-register" ac:schema-version="1" ac:macro-id="a8d8d433-f433-4b5b-97c1-7f08321410c5">
    <ac:parameter ac:name="formName">myForm</ac:parameter><ac:rich-text-body>
        <p><br /></p>
    </ac:rich-text-body>
</ac:structured-macro>
<p><br /></p>

 

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.
May 3, 2024

Hi @Ralf Weidauer 

It is a bit tricky, but the value is not a user field, but a custom class instance. Anyway, this way you can access it's value

#foreach ($u in $usrLst) $u.value #end

Alex 

Ralf Weidauer May 3, 2024

So one should not use the syntax in the documentation (link above)?

Nevertheless, thanks a lot, it serves perfectly for me (want to simplify my work by generating a powershell script to add users to AD-groups...)

 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events