cancel
Showing results for 
Search instead for 
Did you mean: 
ChetChudasamaTS
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.

 

Forms_SecWarning.png

 

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

Chet

 

 

Labels: (1)
0 Kudos
Reply
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:

https://community.nintex.com/t5/Nintex-Workflow-Cloud/Way-to-remove-the-square-brackets-and-quotatio...


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

 

Thanks,
Dan

View solution in original post

0 Kudos
Reply
ChetChudasamaTS
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);
SecMessagesID.change(function()
{
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 - https://community.nintex.com/t5/Nintex-for-Office-365/Nintex-Forms-for-Office-365-set-cascading-look...

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

 

Cheers

Chet

0 Kudos
Reply