Hi Folks,
I have a form with a repeating section and I want the user to input a code (DoDIC) then get a filtered selection of national stock numbers (NSN). Once the user selects an NSN, I want several single line text (SLT) controls to populate from the NSN catalog list. Additionally, I want some of the SLT controls to populate with a calculated value after the "Rounds" (quantity) field is filled in with an integer. These calculated values are "Dollar Value" based on the unit price from the catalog, and the "Short Tons" (STON) based on the STON from the catalog. I have the repeating section working for the first row, but when another row is added, and an NSN is selected, the fields for the second and any subsequent rows do not auto-populate.
To populate the controls, I am using calculated value (CV) controls with a lookup formula as seen in the two screen-shots below...
My js code look like this...
NWF$(function() { NWF$('#'+ jsvar_TARF1NSNLookup_LLU).on('change', function() { setTimeout(function() { if (NWF$('#'+ jsvar_TARF1Nomenclature_CAL).val()) { NWF$('#'+ jsvar_TARF1Nomenclature_TXT).val(NWF$('#'+ jsvar_TARF1Nomenclature_CAL).val()); NWF$('#'+ jsvar_TARF1USGDesc_TXT).val(NWF$('#'+ jsvar_TARF1USGDesc_CAL).val()); NWF$('#'+ jsvar_TARF1STON_TXT).val(NWF$('#'+ jsvar_TARF1STON_CAL).val()*NWF$('#'+ jsvar_TARF1Rounds_INT).val()); NWF$('#'+ jsvar_TARF1DollarValue_CUR).val(NWF$('#'+ jsvar_TARF1Price_CAL).val()*NWF$('#'+ jsvar_TARF1Rounds_INT).val()); } },2000); }); });
I realize it is incomplete with regards to all of the calculations that are based on the number rounds input but while testing I ran into this issue and thought it a priority to find out if this is even possible before I finished the code. Here is a screenshot of a test input that failed to populate the second row.
Calling on some past Nintex Heroes to see if they can respond! @MegaJerk, @nico, @TomaszPoszytek, @cassymfreeman, @SimonMuntz, @mlauer
Any assistance with this would be greatly appreciated!
Thanks and Kind Regards,
Patrick
Best answer by MegaJerk
View original