I have developed this script.
I want it to get the value Materiality and return a new field with YES or NO for additional filtering (i.e. PerfMateriality and Sampling).
The code is stuck on task.AppendField field as Syntax Error.
Could you please help me?
This is the code.
Dim Materiality As Long' Could set to 2 decimal places & do similarly for the following two variables
Dim PerfMateriality As Long
Dim SamplingThreshold As Long
Materiality = InputBox("Type in the Materiality for this client (to the nearest €).")
MsgBox "Materiality = €" & Materiality & vbCrLf & "Performance Materiality = €" & PerfMateriality & vbCrLf & "SamplingThreshold = €" & SamplingThreshold
' Append Field
Set db = Client.OpenDatabase("TEST-JLines.IMD")
Set task = db.TableManagement
Set field = db.TableDef.NewField
field.Name = "MATERIALITY"
field.Description = ""
field.Type = WI_CHAR_FIELD
field.Equation = "@if(ABSOLUTE >= Materiality, ""YES"", ""NO"")"
field.Decimals = 0
Set task = Nothing
Set db = Nothing
Set field = Nothing
Last seen: 3 months 1 day ago
Joined: 10/29/2019 - 11:28