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

Text area in confiform data conversion

Markisio December 11, 2022

Hi there 

 

I have a textarea field in confiform and I want use the value/data within the field as is, meaning with breaks upon using data when I send an email for instance: 

In textarea I typed 

line 1 

line 2

however when I send the email with the data within the text area it will show as “line 1 line 2” 

 

please help, thanks 

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.
December 11, 2022

Hi @Markisio 

Are you using [entry.field_name] notation to get the value from you fields or doing it via the ConfiForms Field macro?

I believe it's the first approach, right? 

You need to either switch to ConfiForms Field macros (which will render values for the user the way they should be) or transform the values as needed, in case you insist on using the [entry.field_name] way (as this way you access the RAW value and it is up to you to get it into the right shape and format)

For example using the replaceCRLFWithBR function will do what you want on a text are field

Alex

Markisio December 12, 2022

Yes I am using [entry.field_name], I will try [entry.field_name.replaceCRLFWithBR()] and let you know 

 

thanks 

Markisio December 12, 2022

Hi @Alex Medved _ConfiForms_ 

 

it didn't work, I tried [entry.incidentSummary.replaceCRLFWithBR] and [entry.incidentSummary.replaceCRLFWithBR()] same issue. 

 

I have that within ‘ConfiForms IFTTT Integration Rules’ Macro and I am sending an email

 

thanks 

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.
December 12, 2022

May I see how are you using that? Could you share a screenshot of your configuration or the storage format?
and why dont you replace that with a ConfiForms Field macro?

Markisio December 12, 2022

Hi @Alex Medved _ConfiForms_ 

not sure if I can send a screen shots, as my organization might block it. But here is what I have and hope this helps and thanks for your patience in advance 

  • I have created Confiform Form Definition 
  • Within that I have created ConfiForms Form Field Definition called incidentSummary
    • the field type of that is textarea, and required 
  • Then I created ConfiForms IFTTT Integration Rules, configuration as follow
    • Event: OnCreated
    • Choose Action to Perform: Send Email 

 

in the incidentSummary field I typed:

Line 1

Line 2

 

however in the email I get: Line 1 Line 2 

 

here is what I have within IFTT Integration Rules

 

Hello Team

This email letting you know about an incident occurs our Portfolio/PG. Here are the details:

 

Incident Summary:

[entry.incidentSummary.replaceCRLFWithBR]

 

hope this helps and thanks again 

Markisio December 12, 2022

hi @Alex Medved _ConfiForms_ 

 

so I came up with solution and not sure if that what you meant, I am sure there is a better and more efficient way than below:

  • I have created Confiform Form Definition 
  • Within that I have created ConfiForms Form Field Definition called incidentSummary
    • the field type of that is textarea, and required 
  • Also created ConfiForms Form Field Definition called incidentSummaryModified
  • Created new Confifroms Rules form Definition 
    • Value to set: incidentSummaryMdified = [entry.incidentSummary.replaceCRLFWithBR]
  • Then I created ConfiForms IFTTT Integration Rules, configuration as follow
    • Event: OnCreated
    • Choose Action to Perform: Send Email 
    • The email content:

Hello Team

This email letting you know about an incident occurs our Portfolio/PG. Here are the details:

 

Incident Summary:

[entry.incidentSummaryMdified]

 

I find odd I had to duplicate the field form definition + ConfiForms rules to achieve this

 

I am sure there is a better way :) please advice if this is the target solution 

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.
December 12, 2022

Hi

There certainly no need for an extra field

Make sure your function is not "styled" in any way and is part of the expression

[entry.incidentSummary.replaceCRLFWithBR]

 Or just put on the same place where this a ConfiForms Field macro

Screenshot 2022-12-12 at 17.43.02.png

Alex

Markisio December 12, 2022

Thanks, so odd that I put it back to my original and worked, thanks for your help I have applied your suggestion which [entry.incidentSummary.replaceCRLFWithBR] within IFTTT Integration Rules. 

 

I swear I had that before and didn't work based on your original suggestion :) 

 

thanks again! 

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.
December 12, 2022

It could be the Confluence editor has inserted some invisible garbage like <span> tags or something

This happens sometime, so this is very important to have your expressions either written somewhere else (like atom editor or notepad) and then copy and pasted into the editor or written very accurately directly in the editor

Or... as an alternative I am pushing here all the time - just use the ConfiForms Field macros. They do it for you.. automatically, no need to access raw field values in the email templates and then transforming them with virtual functions

Like Markisio likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events