How do I concatenate text and field values in Confiforms?

Scott Franz January 30, 2024

I have a form with two fields.  The first field you enter your name.  I want to the second field to display "Hi name, how are you?".  My actual use case will have multiple fields all entering in to the final display field.

1 answer

1 accepted

0 votes
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.
January 30, 2024

Hi @Scott Franz 

Where do you want fields to concatenate? I mean where do you want to use a concatenated value?

The simplest option is to use a formula field with CONCAT function

Alex

Scott Franz January 30, 2024

I just want them to display concatenated so I can copy and paste the whole thing to something else after they're all concatenated.

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.
January 30, 2024

Do you want to do that while entering data in the form or after you have submitted the form?

Scott Franz January 30, 2024

After submitting.  So enter all the values, hit submit, produce the output.

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.
January 30, 2024

Use the formula field with a CONCAT function then, as suggested in the first comment

 

Scott Franz January 30, 2024

It doesn't like that the field is empty to start with.  Is there a way to make the formula field definition wait until it's submitted?

 

Scott Franz January 30, 2024

Maybe it would be best to give you the whole project.  I have this in Excel and it works, but I want it in a Confluence page (not as embedded Excel). 

ConfluencePage.png

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.
January 30, 2024

Not sure I understand your comment prior to one with a screenshot... Formula field is calculated AFTER form is submitted

May be a simple ListView will make more sense. Anyway, let me give you an example below

Demo:

http://recordit.co/sZhjCgOCxF

Configuration:

<ac:structured-macro ac:macro-id="810e61d8-1787-4507-9b91-d5066221338c" 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="4e69f5f4-5272-4b59-8650-bf5c2944dab8" 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="ea1ff18e-80eb-45de-bba8-f5f7ec455b90" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">f1</ac:parameter>
<ac:parameter ac:name="fieldLabel">f1</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</p>
<p>
<span>
<ac:structured-macro ac:macro-id="b484f7e7-dba3-475a-a555-c81d0fa92488" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">f2</ac:parameter>
<ac:parameter ac:name="fieldLabel">f2</ac:parameter>
<ac:parameter ac:name="type">text</ac:parameter>
</ac:structured-macro>
</span>
</p>
<p>
<span>
<ac:structured-macro ac:macro-id="65e94af5-95b3-4376-8e36-a5971166da55" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">formula</ac:parameter>
<ac:parameter ac:name="fieldLabel">Formula</ac:parameter>
<ac:parameter ac:name="extras">CONCAT("Hello [entry.f1]. Nice to meet you. ", "See you and [entry.f2]")</ac:parameter>
<ac:parameter ac:name="type">formula</ac:parameter>
</ac:structured-macro> formula</span>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>
<ac:structured-macro ac:macro-id="a575a3da-92cc-4244-9af5-a8fb02f04bbb" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">form</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>listview approach</p>
<ac:structured-macro ac:macro-id="cd42467a-2cfe-4361-b885-99830d6de8a9" ac:name="confiform-list" ac:schema-version="1">
<ac:parameter ac:name="formName">form</ac:parameter>
<ac:rich-text-body>
<p>Hello [entry.f1]. Nice to meet you. See you and [entry.f2]</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>

 

You decide what makes more sense for you

Alex

Scott Franz January 30, 2024

Oh, I see what you're saying now.  I will give that a go, it should work, thank you!

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events