01-27-2020 12:42 PM
Hello,
Is there a way to clear out a lookup attribute via a client side script? I've tried a few different combinations to clear the value but nothing seems to work with look-up fields. Any suggestions? Currently using Onbase 16 & upgrade to 18 within the year.
See screenshot below of what i'd like to clear with a on screen button.
Thanks,
Mike
01-27-2020 01:05 PM
Hi Mike,
You should be able to do this just by setting the field to null. Your syntax will look something like this.
Screen.CurrentView.Fields("RELATIONSHIPATTRIBUTENAME").Value = null;
I hope this helps!
01-27-2020 01:05 PM
Hi Mike,
You should be able to do this just by setting the field to null. Your syntax will look something like this.
Screen.CurrentView.Fields("RELATIONSHIPATTRIBUTENAME").Value = null;
I hope this helps!
01-27-2020 01:42 PM
That's what i would have expected and did try the above with nothing happening. Here's my client side coding -
var r = confirm("ALERT!\nPress 'OK' if you would like to Reassign Dept. & Prodct.\nPlease delete current assignee.");
if (r == true) {
Screen.CurrentView.Fields("ReferralDepartment").focus();
Screen.CurrentView.Fields("ReferralDepartment").ShowLookupButton=true;
Screen.CurrentView.Fields("ReferralProduct").ShowLookupButton=true;
Screen.CurrentView.Fields("ReferralDepartment").ShowLabel=false;
Screen.CurrentView.Fields("ReferralProduct").ShowLabel=false;
Screen.CurrentView.Fields("ReferralDepartment").ReadOnly=false;
Screen.CurrentView.Fields("ReferralProduct").ReadOnly=false;
Screen.CurrentView.Fields("EmployeeFullName").value=null;
$('.HideTable4').show();
$('.HideTable5').hide();
} else {
}
01-28-2020 04:42 AM
That appears to be correct. Are you positive that you are entering the if statement? If you add an alert right before that line to set it to null, does it display?
Another test would be to just have that line to set it to null and build on that to see if something else is breaking it.
01-28-2020 02:50 PM
Hey Mike,
Try changing the "value" property to upper case. Screen.CurrentView.Fields("EmployeeFullName").Value=null;
Maybe this will solve your problem.
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.