Skip to main content
deleted 211 characters in body
Source Link
s.Lawrenz
  • 193
  • 1
  • 9

I'm building a function that will retrieve data by certain criteria. However, not a single retrieve function will work with a shared data extension. Lookup Rows works, but not retrieve. Data extensions that are not shared work, but as soon as I change my D/E to the shared, I get an empty JSON.

Here is my code:

    <script language="JavaScript" runat="Server" excutioncontexttype="get">

    Platform.Load("Core","1.1");

    //Define my Data Extension this is the external key
    var myDE = DataExtension.Init('ent.myDE');

    //Simple lookup. This should return a couple of rows
    var filter = {Property:'Activity_Id',SimpleOperator:'equals',Value:'SomeDudesId'};
    var data = myDE.Rows.Retrieve(filter);

    //At this point I want the data to return as a JSON obj. 
    function retrieveData(){var jsonData = Stringify(data); return jsonData}
    retrieveData();

    //Printing this on the page because the microsite is in JSON format
    Write(Stringify(data));
    </script>

I am getting empty array everytime with this code.

The answer at the bottom is not the correct answer. So please stop upvoting it as if it is.

I am abandoning this project. Stack exchange proves again that unless its a simple problem, there are no answers.

I'm building a function that will retrieve data by certain criteria. However, not a single retrieve function will work with a shared data extension. Lookup Rows works, but not retrieve. Data extensions that are not shared work, but as soon as I change my D/E to the shared, I get an empty JSON.

Here is my code:

    <script language="JavaScript" runat="Server" excutioncontexttype="get">

    Platform.Load("Core","1.1");

    //Define my Data Extension this is the external key
    var myDE = DataExtension.Init('ent.myDE');

    //Simple lookup. This should return a couple of rows
    var filter = {Property:'Activity_Id',SimpleOperator:'equals',Value:'SomeDudesId'};
    var data = myDE.Rows.Retrieve(filter);

    //At this point I want the data to return as a JSON obj. 
    function retrieveData(){var jsonData = Stringify(data); return jsonData}
    retrieveData();

    //Printing this on the page because the microsite is in JSON format
    Write(Stringify(data));
    </script>

I am getting empty array everytime with this code.

The answer at the bottom is not the correct answer. So please stop upvoting it as if it is.

I am abandoning this project. Stack exchange proves again that unless its a simple problem, there are no answers.

I'm building a function that will retrieve data by certain criteria. However, not a single retrieve function will work with a shared data extension. Lookup Rows works, but not retrieve. Data extensions that are not shared work, but as soon as I change my D/E to the shared, I get an empty JSON.

Here is my code:

    <script language="JavaScript" runat="Server" excutioncontexttype="get">

    Platform.Load("Core","1.1");

    //Define my Data Extension this is the external key
    var myDE = DataExtension.Init('ent.myDE');

    //Simple lookup. This should return a couple of rows
    var filter = {Property:'Activity_Id',SimpleOperator:'equals',Value:'SomeDudesId'};
    var data = myDE.Rows.Retrieve(filter);

    //At this point I want the data to return as a JSON obj. 
    function retrieveData(){var jsonData = Stringify(data); return jsonData}
    retrieveData();

    //Printing this on the page because the microsite is in JSON format
    Write(Stringify(data));
    </script>

I am getting empty array everytime with this code.

added 67 characters in body
Source Link
s.Lawrenz
  • 193
  • 1
  • 9

I'm building a function that will retrieve data by certain criteria. However, not a single retrieve function will work with a shared data extension. Lookup Rows works, but not retrieve. Data extensions that are not shared work, but as soon as I change my D/E to the shared, I get an empty JSON.

Here is my code:

    <script language="JavaScript" runat="Server" excutioncontexttype="get">

    Platform.Load("Core","1.1");

    //Define my Data Extension this is the external key
    var myDE = DataExtension.Init('ent.myDE');

    //Simple lookup. This should return a couple of rows
    var filter = {Property:'Activity_Id',SimpleOperator:'equals',Value:'SomeDudesId'};
    var data = myDE.Rows.Retrieve(filter);

    //At this point I want the data to return as a JSON obj. 
    function retrieveData(){var jsonData = Stringify(data); return jsonData}
    retrieveData();

    //Printing this on the page because the microsite is in JSON format
    Write(Stringify(data));
    </script>

I am getting empty array everytime with this code.

Come on guys, I'm getting desperate here!!!! Every thing I have here should work, and does on business units butThe answer at the bottom is not on sharedthe correct answer. What canSo please stop upvoting it as if it is.

I do?am abandoning this project. Stack exchange proves again that unless its a simple problem, there are no answers.

I'm building a function that will retrieve data by certain criteria. However, not a single retrieve function will work with a shared data extension. Lookup Rows works, but not retrieve. Data extensions that are not shared work, but as soon as I change my D/E to the shared, I get an empty JSON.

Here is my code:

    <script language="JavaScript" runat="Server" excutioncontexttype="get">

    Platform.Load("Core","1.1");

    //Define my Data Extension this is the external key
    var myDE = DataExtension.Init('ent.myDE');

    //Simple lookup. This should return a couple of rows
    var filter = {Property:'Activity_Id',SimpleOperator:'equals',Value:'SomeDudesId'};
    var data = myDE.Rows.Retrieve(filter);

    //At this point I want the data to return as a JSON obj. 
    function retrieveData(){var jsonData = Stringify(data); return jsonData}
    retrieveData();

    //Printing this on the page because the microsite is in JSON format
    Write(Stringify(data));
    </script>

I am getting empty array everytime with this code.

Come on guys, I'm getting desperate here!!!! Every thing I have here should work, and does on business units but not on shared. What can I do?

I'm building a function that will retrieve data by certain criteria. However, not a single retrieve function will work with a shared data extension. Lookup Rows works, but not retrieve. Data extensions that are not shared work, but as soon as I change my D/E to the shared, I get an empty JSON.

Here is my code:

    <script language="JavaScript" runat="Server" excutioncontexttype="get">

    Platform.Load("Core","1.1");

    //Define my Data Extension this is the external key
    var myDE = DataExtension.Init('ent.myDE');

    //Simple lookup. This should return a couple of rows
    var filter = {Property:'Activity_Id',SimpleOperator:'equals',Value:'SomeDudesId'};
    var data = myDE.Rows.Retrieve(filter);

    //At this point I want the data to return as a JSON obj. 
    function retrieveData(){var jsonData = Stringify(data); return jsonData}
    retrieveData();

    //Printing this on the page because the microsite is in JSON format
    Write(Stringify(data));
    </script>

I am getting empty array everytime with this code.

The answer at the bottom is not the correct answer. So please stop upvoting it as if it is.

I am abandoning this project. Stack exchange proves again that unless its a simple problem, there are no answers.

added 133 characters in body
Source Link
s.Lawrenz
  • 193
  • 1
  • 9

I'm building a function that will retrieve data by certain criteria. However, not a single retrieve function will work with a shared data extension. Lookup Rows works, but not retrieve. Data extensions that are not shared work, but as soon as I change my D/E to the shared, I get an empty JSON.

Here is my code:

    <script language="JavaScript" runat="Server" excutioncontexttype="get">

    Platform.Load("Core","1.1");

    //Define my Data Extension this is the external key
    var myDE = DataExtension.Init('ent.myDE');

    //Simple lookup. This should return a couple of rows
    var filter = {Property:'Activity_Id',SimpleOperator:'equals',Value:'SomeDudesId'};
    var data = myDE.Rows.Retrieve(filter);

    //At this point I want the data to return as a JSON obj. 
    function retrieveData(){var jsonData = Stringify(data); return jsonData}
    retrieveData();

    //Printing this on the page because the microsite is in JSON format
    Write(Stringify(data));
    </script>

I am getting empty array everytime with this code.

Come on guys, I'm getting desperate here!!!! Every thing I have here should work, and does on business units but not on shared. What docan I do?

I'm building a function that will retrieve data by certain criteria. However, not a single retrieve function will work with a shared data extension. Lookup Rows works, but not retrieve. Data extensions that are not shared work, but as soon as I change my D/E to the shared, I get an empty JSON.

Here is my code:

    <script language="JavaScript" runat="Server" excutioncontexttype="get">

    Platform.Load("Core","1.1");

    //Define my Data Extension this is the external key
    var myDE = DataExtension.Init('ent.myDE');

    //Simple lookup. This should return a couple of rows
    var filter = {Property:'Activity_Id',SimpleOperator:'equals',Value:'SomeDudesId'};
    var data = myDE.Rows.Retrieve(filter);

    //At this point I want the data to return as a JSON obj. 
    function retrieveData(){var jsonData = Stringify(data); return jsonData}
    retrieveData();

    //Printing this on the page because the microsite is in JSON format
    Write(Stringify(data));
    </script>

I am getting empty array everytime with this code. What do I do?

I'm building a function that will retrieve data by certain criteria. However, not a single retrieve function will work with a shared data extension. Lookup Rows works, but not retrieve. Data extensions that are not shared work, but as soon as I change my D/E to the shared, I get an empty JSON.

Here is my code:

    <script language="JavaScript" runat="Server" excutioncontexttype="get">

    Platform.Load("Core","1.1");

    //Define my Data Extension this is the external key
    var myDE = DataExtension.Init('ent.myDE');

    //Simple lookup. This should return a couple of rows
    var filter = {Property:'Activity_Id',SimpleOperator:'equals',Value:'SomeDudesId'};
    var data = myDE.Rows.Retrieve(filter);

    //At this point I want the data to return as a JSON obj. 
    function retrieveData(){var jsonData = Stringify(data); return jsonData}
    retrieveData();

    //Printing this on the page because the microsite is in JSON format
    Write(Stringify(data));
    </script>

I am getting empty array everytime with this code.

Come on guys, I'm getting desperate here!!!! Every thing I have here should work, and does on business units but not on shared. What can I do?

added 33 characters in body
Source Link
s.Lawrenz
  • 193
  • 1
  • 9
Loading
Source Link
s.Lawrenz
  • 193
  • 1
  • 9
Loading