I am trying to use SSJS to retrieve the DE names of all DE's in a particular folder (folderid = 14273, not sure if that needs to be in quotations), and save them in an upsert DE (DE name = Dede). The below script runs successfully in automation studio but when I check back Dede, no rows are generated. I also tried testing by hardcoding the name of just 1 DE in the folder but that didn't work either.
The upsert DE has 2 fields, Name (primary key, text, max 300 characters) and CreatedDate (date, nullable)
<script runat="server">
Platform.Load("Core", "1.1.1");
var folderId = "14273";
var targetDEName = "Dede";
var dataExtensions = Platform.Function.DataExtension.Retrieve({Property:"CategoryID", SimpleOperator:"equals", Value:folderId});
for (var i = 0; i < dataExtensions.length; i++) {
var deName = dataExtensions[i].Name;
var rowsAffected = Platform.Function.UpsertData(
targetDEName,
['Name'],
[deName],
['CreatedDate'],
[null]
);
}
</script>