DMGET Variables
Variable |
Action or Value |
Example |
[DMGET(RecordTypeID|MaxRecords|var=val| var=val=valto|...|FieldName|LI:FieldName)] |
Runs a search on the local DocMgt server to retrieve Records. The records will be JSON encoded. RecordTypeID: The ID number of the Record Type to search. If blank or global then a global search is performed. MaxRecords: The maximum number of records to return. If blank this will be set to 25. Keep this as low as possible for best results. var=val: Field name and value combination to search for. Can be repeated as many times as necessary. Can be interchanged with var=val=valto as needed. var=val=valto: Field name and value range to search for. Can be repeated as many times as necessary. Can be interchanged with var=val as needed. * Note: Add as many var=val and/or var=val=valto entries as needed to limit the search down as much as possible. FieldName: Name of the Field to return in the collection. You can add as many as you like using the pipe delimiters. If none specified then all fields are returned. LI:FieldName: Name of the Line Item Field to return in the collection. You can add as many as you like using the pipe delimiters. If none specified then all line item fields are returned. * Note: If you don't want any Line Item fields returned use LI:x or some other field name that doesn't exist. |
Search record type # 1 for a maximum of 2 records. Limit search to only those records where the VendorName field is equal to ACME. [DMGET(1|2|VendorName=ACME)] Search record type # 4 for a maximum of 3 records. Limit search to only those records where the Amount field is from 0 to 200. [DMGET(4|3|Amount=0=200)] Search record type # 4 for a maximum of 3 records. Limit search to only those records where the Amount field is from 0 to 200. Return only the Vendor, InvoiceDate and Amount fields and no line item fields. [DMGET(4|3|Amount=0=200|Vendor|InvoiceDate|Amount|LI:X)] |
[DMGET2(RecordTypeID|MaxRecords| var=val^var=val=valto|Field1^Field2| Custom1^Custom2|SortOrder|MultiAsArray)] [DMGETIN(RecordTypeID|MaxRecords| var=val^var=val=valto|Field1^Field2| Custom1^Custom2|SortOrder|MultiAsArray)] |
DMGET2 - Runs a search on the local DocMgt server to retrieve Records. The records will be JSON encoded. DMGETIN - Returns field values from the resulting records using the -IN- separator for use in searches. ---- RecordTypeID: The ID number of the Record Type to search. If blank or 0 then a global search is performed. MaxRecords: The maximum number of records to return. If blank this will be set to 25. Keep this as low as possible for best results. var=val / var=val=valto: Field name and value combination to search for. Can be repeated as many times as necessary using ^ as a separator per field. valto is used for range searching only. If you are doing an exact search leave this out. You can use RecordID as a field name with a numeric value to search a specific Record. Field1^Field2: Names of the Fields to return in the collection. You can add as many as you like using ^ delimiters. If none specified then all fields are returned. Can be repeated as many times as necessary using ^ as a separator per field. Custom1^Custom2: Custom fields that can be returned based on variables. You must use << and >> instead of [ and ] for the variables to be sure they are interpreted at the proper time. For instance, to return a field named ALL that combines Name and Address fields you could specify "ALL=<<Name>> - <<Address>>" here. Can be repeated as many times as necessary using ^ as a separator per field. SortOrder: The field by which to order your query to ensure Records are returned in the order required. MultiAsArray: If true and you are returning values from a field that is marked as allowing multiple then we return them as an array of values. If False then the values are returned as a string delimited by the ^ character. Default is true. Not used for DMGETIN. InField - the name of the field to use for the -IN- string. Using DMGETIN is a shortcut to using [JOIN([DMGET2(xxxxxxx)])] variables. |
DMGET2 Examples Search record type # 1 for a maximum of 2 records. Limit search to only those records where the VendorName field is equal to ACME. [DMGET2(1|2|VendorName=ACME)] Search record type # 4 for a maximum of 3 records. Limit search to only those records where the Amount field is from 0 to 200. [DMGET2(4|3|Amount=0=200)] Search record type # 4 for a maximum of 3 records. Limit search to only those records where the VendorName field is equal to ACME and Amount field is from 0 to 200. Return only the Vendor, InvoiceDate, Amount and Paid fields. Add an additional custom field named Remaining that calculates the Amount of the invoice minus the Paid amount. [DMGET2(4|3|VendorName=ACME^Amount=0=200|Vendor^InvoiceDate^Amount^Paid|Remaining=<<math(<<Amount>>-<<Paid>>)>>)] DMGETIN Example Search all Vendor records (ID = 12) and return the VendorID field values formatted using -IN- logic. [DMGETIN(12|0||VendorID||||VendorID)] returns: ACM123 -IN- TON545 -IN- OTH766 * You can use this in a search field to find all Records where that field contains any of the values returned. In database terminology, this is similar to a JOIN searching operation. |
[DMGETLI(RecordTypeID|MaxRecords| var=val^var=val=valto| livar=val^livar=val=valto|Field1^Field2| LIField1^LIField2|SortOrder|MultiAsArray)] |
DMGETLI - Runs a search on the local DocMgt server to retrieve Records and their line items in JSON format. ---- RecordTypeID: The ID number of the Record Type to search. If blank or 0 then a global search is performed. MaxRecords: The maximum number of records to return. If blank this will be set to 25. Keep this as low as possible for best results. var=val / var=val=valto: Field name and value combination to search for. Can be repeated as many times as necessary using ^ as a separator per field. valto is used for range searching only. If you are doing an exact search leave this out. You can use RecordID as a field name with a numeric value to search a specific Record. livar=val / livar=val=valto: Line Item Field name and value combination to search for. Can be repeated as many times as necessary using ^ as a separator per field. valto is used for range searching only. If you are doing an exact search leave this out. Field1^Field2: Names of the Fields to return in the collection. You can add as many as you like using ^ delimiters. If none specified then NO fields are returned. Can be repeated as many times as necessary using ^ as a separator per field. NOTE: If a line item field name is the same as a header field name that is being returned then the header field is renamed with "-Header" (no quotes) appended to the name. LIField1^LIField2: Names of the Line Item Fields to return in the collection. You can add as many as you like using ^ delimiters. If none specified then NO line item fields are returned. Can be repeated as many times as necessary using ^ as a separator per field. SortOrder: The field by which to order your query to ensure Records are returned in the order required. |
Example: Return invoice details for all invoices from January 2024 including the Vendor, Invoice Date and Amount from the header info and GL Code, Price, and Total from the line item info. Sort the results by Invoice Date. [DMGETLI(1|0|InvoiceDate=1/1/2024=1/31/2024||Vendor^InvoiceDate^Amount|GLCode^Price^Total|InvoiceDate)] |
[DMGETCOUNT(RecordTypeID| var=val^var=val=valto)] |
Counts the number of Records matching criteria. RecordTypeID: The ID number of the Record Type to search. If blank or 0 then a global search is performed. var=val / var=val=valto: Field name and value combination to search for. Can be repeated as many times as necessary using ^ as a separator per field. valto is used for range searching only. If you are doing an exact search leave this out. |
[DMGETCOUNT(1|VendorName=ACME) = 10 (# Records) |
[DMGETOPTIONS(RecordTypeID|MaxRecords| var=val^var=val=valto|ValueField| DisplayField|SortOrder|Unique|FilterField| AmountField|DocumentID)] |
Runs a search on the local DocMgt server to retrieve Records. The records will be formatted to fill Radio, Option and Multi-Option lists in E-form. RecordTypeID: The ID number of the Record Type to search. If blank or 0 then a global search is performed. MaxRecords: The maximum number of records to return. If blank this will be set to 25. Keep this as low as possible for best results. var=val / var=val=valto: Field name and value combination to search for. Can be repeated as many times as necessary using ^ as a separator per field. valto is used for range searching only. If you are doing an exact search leave this out. ValueField: Name of the Field That is to be used for the VALUE setting in the field options. DisplayField: Name of the Field That is to be used for the DISPLAY setting in the field options. SortOrder: The field by which to order your query to ensure Records are returned in the order required. Unique: Whether to return items that are unique. It there are duplicates then only the first item of the duplicates will be returned. NOTE: Uniqueness is based on the 'Value' and 'Filter' fields. And if Filter is not used then only on the Value field. FilterField: Name of the Field That is to be used for the FILTER setting in the field options. AmountField: Name of the Field That is to be used for the AMOUNT setting in the field options. DocumentID: ID of a CSV document to use for the data source. You can use this as a more efficient method for populating options. NOTE: this method is more simplistic when using var=val pairs. It does not support range searches and -OR- searches. |
[DMGETOPTIONS(1|2|VendorName=ACME|ID|VendorName|VendorName)] Returns a list of the first 2 vendors using the ID as the value and VendorName as display. The list is sorted by VendorName. ----- DMGETOPTIONS(1|0||InvoiceNum||VendorName|||VendorID)] Returns a list of ALL invoices using the InvoiceNum as the value, InvoiceNum as display and VendorID as the Filter value. This is useful for creating cascading option lists where list 1 would be the Vendor and list 2 would be their invoices. Just set list 2's 'Filter Options By' setting to list 1. |
[DMGETCHARTDATA(RecordTypeID|MaxRecords| var=val^var=val=valto|LabelField|ValueField| SortOrder|Unique|GroupingField|reserved| DocumentID)] |
Runs a search on the local DocMgt server to retrieve Records. The records will be formatted for display in a Chart field in E-forms. RecordTypeID: The ID number of the Record Type to search. If blank or 0 then a global search is performed. MaxRecords: The maximum number of records to return. If blank this will be set to 25. Keep this as low as possible for best results. var=val / var=val=valto: Field name and value combination to search for. Can be repeated as many times as necessary using ^ as a separator per field. valto is used for range searching only. If you are doing an exact search leave this out. LabelField: Name of the field That holds the LABEL value for the chart data. ValueField: Name of the field That holds the VALUE to be charted. SortOrder: The field by which to order your query to ensure Records are returned in the order required. Unique: Whether to return items that are unique. It there are duplicates then only the first item of the duplicates will be returned. This is based on the Value Field only. GroupingField: Name of the Field That is to be used for grouping the charted data. Reserved: This will be ignored. DocumentID: ID of a CSV document to use for the data source. You can use this as a more efficient method for populating options. NOTE: this method is more simplistic when using var=val pairs. It does not support range searches and -OR- searches. |
[DMGETCHARTDATA(1|2|VendorName=ACME|InvoiceDate|Amount|||VendorName)] Returns a list of the first 2 invoices using the Invoiced Date for the label, AMount to be charted and grouped by Vendor Name. |
[DMGETPROP(RecordTypeID| var=val^var=val=valto|Field^Field|Delim)] |
Runs a search on the local DocMgt server to retrieve a specific property (field value) from the first Record that matches. RecordTypeID: The ID number of the Record Type to search. If blank or 0 then a global search is performed. var=val / var=val=valto: Field name and value combination to search for. Can be repeated as many times as necessary using ^ as a separator per field. valto is used for range searching only. If you are doing an exact search leave this out. Field: The field whose value to return. If you have multiple you can split them with the ^ character. The return will be a string with all values in all fields separated by the Delim value below. Delim: The character to use to delimit the returned values. If you are only returning one field then you will get that value back. If you specify more than one field to return the values will be separated by the character you set here. If you leave it blank then the delimiter will be ^. |
Search record type # 1 where the VendorName field is equal to ACME and return the value from the Email field. [DMGETPROP(1|VendorName=ACME|Email)] Search record type # 1 where the VendorName field is equal to ACME and return the Email and Address values separated by a hyphen. [DMGETPROP(1|VendorName=ACME|Email^Address|-)] |