Deluge - list & iterate through all form fields for an audit log
Hi,
I'm trying to build an audit log (I'll call it AuditLog) that will update every time I make a change to my primary form (which I'll call Form1).
The form AuditLog contains 4 fields:
Entry_Date_Time (date time)
User_Name (single line)
Description1 (single line)
Description2 (multiline)
In onSuccess state for On Add, On Edit and On Delete form actions in Form1, I call this code:
- insert into AuditLog
- [
- Added_User = zoho.loginuser
- Description1 = "added record " + input.ID
- Description2 = "input.ID=" + input.ID + "~~" + "input.Field1=" + input.Field2 + "~~" + "input.Field2=" + input.Field2 + "~~" + "input.Field3=" + input.Field3 + "~~END"
- Entry_Date_Time = zoho.currenttime
- User_Name = zoho.loginuser
- ];
While this works OK, I have a list of 20 fields to add to Description2, and it's laborious concatenate fields in this way. I'm using ~~ as the delimiter between key/value pairs.
In a nutshell: is there a way to list and/or iterate through the entire list of fields in a form to concatenate a string link you see in Description2 above?