nuSelectBrowse search behavior
Posted: Thu Mar 30, 2023 4:55 pm
I have a browse form that needs to link to 2 different forms based on which column is checked so I rerouted it through a procedure to determine which since I should have the id (it will be the same primary key for both forms)
In the procedure it determines an order type (Estimate, in progress, completed) and it runs
The nuSelectBrowse was an attempt to mirror what is in nuform.js to stop it running twice
My problem is that clicking on the red search text throws an uncaught type error (if you click on the second word searched ex: "Web order 98" errors if you click on order) and then adds extra breadcrumbs if you click any of the red text.
Any ideas how to stop the extra breadcrumbs?
Code: Select all
function nuSelectBrowse(e, t) {
let r = $(e.target).attr('data-nu-primary-key');
let PullOID = /data-nu-primary-key="([0-9]+)/;
if(Number.isInteger(Number(r))){
nuRunPHPHiddenWithParams('BrowseOrderTypeLookup', 'OrderID', r);
}else if(typeof t !== 'undefined' && 'outerHTML' in t){
let PKMatch = t.outerHTML.match(PullOID);
nuRunPHPHiddenWithParams('BrowseOrderTypeLookup', 'OrderID', PKMatch[1]);
}
}
Code: Select all
nuForm('$FormID', '$OrderID', '', '', 0); var nuSelectBrowse = function(e, t){};
My problem is that clicking on the red search text throws an uncaught type error (if you click on the second word searched ex: "Web order 98" errors if you click on order) and then adds extra breadcrumbs if you click any of the red text.
Any ideas how to stop the extra breadcrumbs?