ConfiForms Rules for Field Definition set value for Textarea/Markdown field empty on form submit

Brian Karst June 12, 2020

I have been trying to set up a rule that will insert a default value for a textarea/markdown field in a form if a user leaves it empty. I am using the 'Set value if empty' Action and have tried many different combinations of field names (including blank) and conditions to check. What I keep running into is this.

If I leave Execute only on user action unchecked, the rule functions, but also populates the form with the default '{color:red}<insert Bleh Bleh Bleh>{color}.

I would like to keep the field empty on the form and only input the default on submit of the form so the default value will get inserted into the description.

If I check Execute only on user action, the rule doesn't appear to function. The field is empty, and nothing gets placed into the description when the form is submitted, unless I track another field and do something with it and then it gets placed into the field before the form is submitted.

Is there a way to track the submit/register button in the rule? Is there another way to accomplish this? I was going to look into replacing the register button with an action button or something

3 answers

1 accepted

2 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.
June 12, 2020

Add the condition to this rule to check if the field is empty (to ensure it is executed only in appropriate case)

Brian Karst June 12, 2020

I have been using the empty condition, maybe some of my attempts and results will better clarify

------------------------------------

Field Name: eventdescription

Condition: eventdescription:[empty]

Execute only on user action: unchecked

Action to execute: Set Value if empty

Values to set: eventdescription={color:red}<Insert Activity Description here>{color}

Result: Event description field has "{color:red}<Insert Activity Description here>{color}" prefilled in form (failure). Event description section in issue description has "<Insert Activity Description here>" in red text (success)

-----------------------------------

Field Name: eventdescription

Condition: eventdescription:[empty]

Execute only on user action: checked

Action to execute: Set Value if empty

Values to set: eventdescription={color:red}<Insert Activity Description here>{color}

Result: Event description field is blank in form (success). Event description section in issue description is blank (failure)

-----------------------------------

Field Name: (left blank)

Condition: [entry.eventdescription]:[empty]

Execute only on user action: unchecked

Action to execute: Set Value if empty

Values to set: eventdescription={color:red}<Insert Activity Description here>{color}

Result: Event description field has "{color:red}<Insert Activity Description here>{color}" prefilled in form (failure). Event description section in issue description has "<Insert Activity Description here>" in red text (success)

-----------------------------------------

Field Name: (left blank)

Condition: [entry.eventdescription]:[empty]

Execute only on user action: unchecked

Action to execute: Set Value if empty

Values to set: [entry.eventdescription]={color:red}<Insert Activity Description here>{color}

Result: Event description field is blank in form (success). Event description section in issue description is blank (failure)

-----------------------------------------

Field Name: (left blank)

Condition: eventdescription:[empty]

Execute only on user action: unchecked

Action to execute: Set Value if empty

Values to set: [entry.eventdescription]={color:red}<Insert Activity Description here>{color}

Result: Event description field is blank in form (success). Event description section in issue description is blank (failure)

-----------------------------------------

I just want the entry field to be empty for the user, but if it is empty - to place a default message as a "reminder" for them to fill in the information later as it becomes available.   

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.
June 14, 2020

Well, I would say ConfiForms behaves correctly for the rules you setup (first rule setup is correct, others are not), but...

What you want - cannot be done via the rule... Because you want to set the value for a field ONLY after you have submitted the form

This needs to be done with a ConfiForms IFTTT with "Create/Update ConfiForms Entry" action

And that shall have a condition

eventdescription:[empty]

and the parameters to set would be something like

entryId=[entry.id]&eventdescription={color:red}<Insert Activity Description here>{color}
Brian Karst June 15, 2020

That will work, thanks Alex. Learning more and more about these forms every day.

Lilian July 13, 2021

Thanks Alex - this helped me set the default for radio buttons.

0 votes
Joe66
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 21, 2024

@Alex Medved _ConfiForms_ 
Hi alex,
I'm using confiform IFTTT Integration rules macro to update a particular field Status to give an error message as the updated entry incase the name field doesn't have any value in its entry.

Event: onModified
Choose action: Create/Update confiform entry
Fire IFTTT Action: name:[empty] AND Status.label:success
Parameters to set: entryId=[entry.id]&Status.label={color:red}"Error:Cannot choose success with empty name value"{color}

the color isn't working for me. However, the error message is getting updated in the particular entry but its not in red. Need some help here.

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.
March 21, 2024

Is your status field is a markdown type (field)?

Joe66
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 21, 2024

It is of Status type (field) with dropdown options success, fail, progress. So for a particular record, when I choose success from the dropdown in the status field in the tableview macro when the name field is empty, the particular entry in the status field would get changed to "Error:Cannot choose success with empty name value". But I was hoping the text color would get changed to red but didn't work. Is it not possible to change using {color:red} or something similar when setting the parameter value ?

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.
March 21, 2024

You can only set it to one of the status values you have defined....

(a value, not a label - and values for the status field are predefined for each supported color - see status field in https://wiki.vertuna.com/display/CONFIFORMS/Documentation)

 

0 votes
Yangyang Liu January 28, 2021

Hi Alex,

 

I have tried this. Thanks, it works.

However, when I set the "Reference to form and its location" to be the exact same form on the same page, two separate data entries would be saved from only one form submission. In another word, a single click on the "Save" button would submit the form twice.

截屏2021-01-28 上午12.11.16.png

I just wish how can the IFTTT "Create/Update ConfiForms Entry" action Update data into the same data entry as the one submitted using the "Save" button?

(How can the record be one instead of two upon each form submission?)

 

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.
January 28, 2021

Do you set 

entryId=[entry.id]

in your parameters for the "Create/Update ConfiForms Entry" IFTTT action?

See the description for this action and it tells you to set the ID parameter (as mentioned above) to perform an "update"

Alex

Like Yangyang Liu likes this
Yangyang Liu January 28, 2021

Oh, I have not actually.

 

I just tried adding this to the parameter and it works fine!

Thanks!

 

Yangyang

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events