How do I display a validation error for a field that is within a TableView macro?

Kathleen Janiszewski September 29, 2023

I have a TableView macro where users enter their planned hours for each quarter.  The field definitions are on a ConfiForm on another page.  The validation rule work, meaning, they don't allow the user to change the value.  However, the user may not know that, as the entry box doesn't turn red, and there's no error message.  These fields are within a TableView macro.  How can I pass the message through to the user?

1 answer

0 votes
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.
September 29, 2023

Hi @Kathleen Janiszewski 

How is the TableView configured? Are you using the inline edits or inline individual edits?

Anyway, in any case the errors are shown when the attempt to update the records results in an error or in a validation error

Alex

Kathleen Janiszewski October 2, 2023

Alex,

I'm using inline individual edits.

-Kathleen

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.
October 2, 2023

Honestly, there is no such option in "cloud" version, as this question is tagged here. 

This must be a question about ConfiForms for server/data center

But a simple test with a custom validation rule and an inline edit enabled for the table shows this result http://recordit.co/p7UCICArOj

This is the configuration I am testing it with

<ac:structured-macro ac:macro-id="067155c4-469f-4b8e-b921-1180640f03e9" 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="eab8dfb8-b2c8-4097-8a04-f8da1b284367" 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="3c2fa225-9d21-4f51-b18c-182be1dcb6ad" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">num</ac:parameter>
<ac:parameter ac:name="fieldLabel">num</ac:parameter>
<ac:parameter ac:name="type">number</ac:parameter>
</ac:structured-macro>
</p>
<p>
<ac:structured-macro ac:macro-id="9695a937-fcf3-4c25-b0e8-f69c506dfeb3" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">num:&lt;0</ac:parameter>
<ac:parameter ac:name="fieldName">Num must be larger than 0</ac:parameter>
<ac:parameter ac:name="action">Validation rule</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>
<ac:structured-macro ac:macro-id="97b160ab-e04e-4e0a-b7a2-6c51b44ea10b" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">form</ac:parameter>
<ac:parameter ac:name="enableGridEdit">true</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>

Alex

Kathleen Janiszewski October 2, 2023

Alex,

Yes, it's the server/datacenter version.  The tags were prefilled, and I didn't change them.

Anyway, the registration macro is on a different page.   Would that be the problem.  I don't want the data and the form to be on the same page.

-Kathleen

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.
October 2, 2023

Having a form on a different page makes no difference

Does the example configuration works for you or it does not?

Alex

Kathleen Janiszewski October 2, 2023

Alex,

The form will not store the amount typed it, but it does not return an error message.

<p class="auto-cursor-target">
<ac:structured-macro ac:macro-id="9f594dd3-398c-4a3c-aa3b-162fb7c7bffc" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">week1hours</ac:parameter>
<ac:parameter ac:name="fieldLabel">2-6 OCT</ac:parameter>
<ac:parameter ac:name="type">number</ac:parameter>
</ac:structured-macro> <ac:structured-macro ac:macro-id="7eb61574-f0b8-4a01-b624-994fbd47eae1" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">week1hours:&gt;44</ac:parameter>
<ac:parameter ac:name="fieldName">Maximum of 44 hours per week.</ac:parameter>
<ac:parameter ac:name="action">Validation rule</ac:parameter>
<ac:parameter ac:name="onUserActionOnly">true</ac:parameter>
</ac:structured-macro>
</p>

-Kathleen

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.
October 2, 2023

Does that mean that the example I have provided does not work for you? This seems to be something else in your comment... 

What ConfiForms version are you using?

Kathleen Janiszewski October 2, 2023

Alex,

I didn't try your example.  I can't have the registration macro on the same page as the ConfiForm fields.  I can try it, but they will have to be on 2 separate pages.

-Kathleen

Kathleen Janiszewski October 2, 2023

Alex,

I tried it with your example, and I still get no error.  It does not accept the new value, which is correct, but it does not raise an error:

<ac:structured-macro ac:macro-id="96d4207d-50bf-4d06-a2a7-f46ae3bcb4b6" ac:name="confiform-entry-register" ac:schema-version="1">
<ac:parameter ac:name="formName">testing123</ac:parameter>
<ac:parameter ac:name="registrationButtonLabel">Test Me</ac:parameter>
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="1d8368c3-9957-4b18-8245-905bb0257fac" ac:name="confiform" ac:schema-version="1">
<ac:parameter ac:name="formName">testing123</ac:parameter>
<ac:parameter ac:name="registrationFormTitle">Testing 1-2-3</ac:parameter>
<ac:rich-text-body>
<ac:structured-macro ac:macro-id="0f6d578a-2493-4e6a-911e-23b6f89427b3" ac:name="confiform-field-definition" ac:schema-version="1">
<ac:parameter ac:name="fieldName">field1</ac:parameter>
<ac:parameter ac:name="fieldLabel">Field 1</ac:parameter>
<ac:parameter ac:name="type">number</ac:parameter>
</ac:structured-macro> <ac:structured-macro ac:macro-id="49d3f11e-55ea-4939-875e-ac6d10f9e17a" ac:name="confiform-field-definition-rules" ac:schema-version="1">
<ac:parameter ac:name="condition">field1:&lt;0</ac:parameter>
<ac:parameter ac:name="fieldName">Number must be at least 0.</ac:parameter>
<ac:parameter ac:name="action">Validation rule</ac:parameter>
</ac:structured-macro>
</ac:rich-text-body>
</ac:structured-macro>
<p>
<br/>
</p>
<ac:structured-macro ac:macro-id="281783b4-d30a-4de5-b1d6-60787bc30a06" ac:name="confiform-table" ac:schema-version="1">
<ac:parameter ac:name="formName">testing123</ac:parameter>
<ac:parameter ac:name="enableGridEdit">true</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
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.
October 2, 2023

What version of ConfiForms are you using?

Kathleen Janiszewski October 2, 2023

Alex,

It's Confluence 7.14.3.

-Kathleen

Kathleen Janiszewski October 3, 2023

Alex,

Is it the version?  Otherwise, I don't see any reason this should not work.  I get an error if I enter invalid data by editing the form.

error example.PNG

Thank you in advance.

-Kathleen

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.
October 3, 2023

I was asking about the ConfiForms plugin version you are using - here is how you can quickly check that

(not Confluence)

Alex

Kathleen Janiszewski October 4, 2023

Alex,

Then it's: ConfiForms (version: 2.22). 

-Kathleen

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.
October 4, 2023

2.22!? Oh it's a version that is couple of years old

Please consider updating ConfiForms plugin

Kathleen Janiszewski October 4, 2023

Alex,

Ok, I'll talk to one of our Admins and put in a ticket.

That might just solve the problem.

Thank you!

-Kathleen

Suggest an answer

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

Atlassian Community Events