Hi all,
I'm attempting to extract the last row of a table, to use in a lookup directly in forms.
I'm attemping this method he re here https://answers.laserfiche.com/questions/153832/Table-and-Collection-JavaScript-Event-Handlers
But am having a bit of trouble porting the new code to the modern designer. I am fresh to Javascript.
I'm using the new guide here to try and attempt this https://doc.laserfiche.com/laserfiche.documentation/11/administration/en-us/Subsystems/Forms/Content/Javascript-and-CSS/JavaScript-in-the-Forms-Designer.htm
My code is
$(document).ready(function(){ LFForm.onfieldChange(('.Table').on('change',function(e){ console.log('My Table Changed!')); }); });
What am I missing here, push in the right direction appreciated.
Also as I'm experimenting,
LFForm.onFieldChange(() => console.log("change"),LFForm.setFieldValues({fieldId:3}, 2), {variableName: "Single_Line"});
I was expecting that this would set the field with ID 3 to the number 2, when there was a change made however it seems to execute this before a change is made to the field?
Thanks