I've been struggling with checking if a Lookup type field populated (or empty) & depending on that populate another (text) filed.
Must admit I'm not particularly good at js (even jquery for that case), but i failed to do so, somehow my lookup field always showing filled (on screenshot top).
Here's my attempt(below)
Code: Select all
let oby = nuGetObjectId('obyekt');
let b = nuGetValue('blok') || "UB";
let e = nuGetValue('pod') || "UE";
let f = nuGetValue('etaj') || "UF";
let n = nuGetValue('nom') || "UN";
if (nuIsNewRecord()) {
if (oby !== null) nuSetValue('hid', 'b'+ b +'e'+ e +'f'+ f +'n'+ n);
}
i wonder if there's a built in method to make such checking (for objects/lookups) ?