Showing results for 
Search instead for 
Did you mean: 
Nintex Newbie

Condition to hide panel using Calculated Value on Repeating Section field

Jump to solution

I have two problems both of which are interlinked in a Travel Authorisation form that I am building.

I am attempting to hide a security warning message when a city field in a repeating section contains a security level and present the security message inside the Security Warning.


There is a list of Countries with columns for every city (used for cascading lookup below), where applicable each city has an associated Security Level assigned (calculated value circled in red below) and security comment (calculated value circled in Green below)


The requirements are to

a) Only show the Security Warning when a city contains a security level

- multiple cities are selected below and the security level is presented in an array [3,,1] 

b) Present the Security Message as 

KABUL - Please get approval from CFO

ORAN - Please get approval from the Budget Holder

instead of [KABUL - Please get approval from CFO,#Value!,ORAN - Please get approval from the Budget Holder]


I would need to remove the blank values "#Value!," and remove the square blackets "[ ]" and replace remaining commas with a line break if possible.




All calulkated fields will eventually be hidden using CSS, 


I do believe this is possible using replace() but I have tried the inArray(0 with little success.


Appreciate any help here thanks




Labels: (1)
0 Kudos
2 Replies
Nintex Employee
Nintex Employee

Re: Condition to hide panel using Calculated Value on Repeating Section field

Jump to solution

Hi @ChetChudasamaTS,


I answered your question in the link below:

This should hopefully provide the info you're looking for!



View solution in original post

0 Kudos
Nintex Newbie

Re: Condition to hide panel using Calculated Value on Repeating Section field

Jump to solution

Hi @burked 


I was a little creative and used the security level array [3,,1] and added a rule to hide the security warning when NamedControl==0. This was effective.

Then last Friday, I ended up using JavaScript to iterate through the security message calculated field

[KABUL - Please get approval from CFO,#,ORAN - Please get approval from the Budget Holder] Named control - calcArSecMessageandComment - JavaScript Variable "varSecMessagesID" (I replaced any blank values with #)

to be output to SecurityWarningComments multi line text field - JavaScript Variable - "varMessageTextBox"

// varMessageTextBox = SecurityWarningComments
// varSecMessagesID = calcArSecMessageandComment

var SecMessagesID = NWF$('#' + varSecMessagesID);
var arrayContent = SecMessagesID.val();
arrayContent = arrayContent.replace('[','');
arrayContent = arrayContent.replace(']','');
arrayContent = arrayContent.replace(new RegExp(',#','g'), '');
arrayContent = arrayContent.replace(new RegExp(',','g'), '\r');

NWF$('#' + varMessageTextBox).val(arrayContent);

Thanks for your help and I may have worked around the issue I'm having with a different post -

but now I need to find a way of copying the Repeating Section and its nested repeating section to a duplicate in the same form




0 Kudos