Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Celebration

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root

Avatar

1 badge earned

Collect

Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!

Challenges
Coins

Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.

Recognition
Ribbon

Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!

Leaderboard

Count Multi-user Field & Remove specific users

____Counting

I have a multi-user field I need to the "length" of (the number of users)- field name "multiuser".

 

I've tried multiuser.asLength, asCount, AsSize, asArray.asLength, [entry.multiuser.asLength], [entry.multiuser.asArray.asLength, asArrayMultiUserPicker.asLength, etc etc.

 

____Removing

I also want an action button that allows users to freely remove themselves from the multiuser field.

I've tried the following according to: Virtual functions - Vertuna WIKI - ConfiForms

multiuser=[entry.multiuser].remove(dthomas)

multiuser=[entry.multiuser.remove(dthomas)]

 

 

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.
Oct 12, 2023

Hi @Denver Thomas 

Simple example, hope it helps

Form configuration and the CardView as an example

Screenshot 2023-10-12 at 18.29.29.png

Config for action button with action to perform set to

multiuser=[entry.multiuser.remove([entry._user]).asList]

Screenshot 2023-10-12 at 18.29.42.png

Configuration to get number of multi-users in a field

Screenshot 2023-10-12 at 18.29.49.png

 

Complete configuration

<ac:structured-macro ac:macro-id="acea6f74-e9e8-4ffb-b5d6-4907d521be72" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">form</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="5502bbd7-50ce-45a3-8d87-7b03696cd06f" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<ac:structured-macro ac:macro-id="32b58ba7-2149-49c8-9914-d9678271b277" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">multiuser</ac:parameter>
<ac:parameter ac:name="fieldLabel">Multi user</ac:parameter>
<ac:parameter ac:name="type">multiuser</ac:parameter>
<ac:parameter ac:name="required">true</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="b9cc945b-203f-481f-919c-92697be42206" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">removeme</ac:parameter>
<ac:parameter ac:name="fieldLabel">Remove me</ac:parameter>
<ac:parameter ac:name="extras">multiuser=[entry.multiuser.remove([entry._user]).asList]</ac:parameter>
<ac:parameter ac:name="type">action_button</ac:parameter>
<ac:parameter ac:name="separator">OK, removed</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>
<ac:structured-macro ac:macro-id="04122f97-a5a2-4d39-adf6-8a5c4a6401e3" ac:name="confiform-card" ac:schema-version="1">
<ac:parameter ac:name="formName">form</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="6a06b0ce-26fa-4983-97a5-26c9d1532853" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">multiuser</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="2c7c1d4e-22ff-420c-a790-4bdb65996b83" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">multiuser.asCount</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="4fce2d4c-1bf1-4f2e-867c-93f4056bdc70" ac:name="confiform-field" ac:schema-version="1">
<ac:parameter ac:name="fieldName">removeme</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>

Alex

Perfect. I could have sworn I'd tried multiuser.asCount, but perhaps not . . . 

Thank you, Alex!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events