Looking for example of loadAllDefaultValues()

When I create a new entry using insertAPIEntry(), it does not load the default value for the fields. I’ve been tinkering with loadAllDefaultValues() and can’t get it to work. I thought it might be because of the [user] parameter so I tried user.getUserName() but that just returned an error.

Here’s an example of how I have implemented loadAllDefaultValues()

function loadDefault(ID) {
  var entry = db.getAPIQuery('/backend2/3').getAPIEntry(ID);

but the field “Test” is still blank despite the “free text” box having a default value of “red”.

I have worked out it just loads them into a var, which I tried, but I just get ‘undefined’.

Sorry for the late reply, we don’t have examples for these workflow API calls yet…but we are currently working hard on creating a more comprehensive, download and “playable” workflow script sample for you to test and modify. We do realize that having a comprehensive set of workflow sample would be the best way for new developers to learn. We should be releasing this sample along with updated workflow documentation within a few weeks. I will update our progress on this post when it’s ready.

Wow, those script samples will change everything for us, you guys/girls ROCK!!!

Thanks a ton