In my data extension, I have two fields / columns:
- JobID
- DE_NAME
In this use case i want to receive the value for JobID and DE_NAME (1st row only)
var queryAllAccounts = true;
var cols = ["JobID","DE_Name"];
//define data extension from where record / value is needed
var DE_ContentDetails_ExternalKey = "1111-1111-1111-1111";
var filter = {
Property: "CustomerKey",
SimpleOperator: "equals",
Value: DE_ContentDetails_ExternalKey
};
var tables = api.retrieve("DataExtensionObject[" + DE_ContentDetails_ExternalKey + "]", cols, filter, queryAllAccounts);
Write(tables.JobID);
Write("<br>");
Write(tables.DE_NAME);
Issue: I am getting blank output, why?
tables.Results
is the array holding your results. see also: salesforce.stackexchange.com/questions/358385/… for the general explanation, and here: salesforce.stackexchange.com/questions/347770/… for it being applied to an actual example.