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
Solved! Go to Solution.
I answered your question in the link below:
This should hopefully provide the info you're looking for!
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.
// 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 - 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