What is wrong with my Autofill script? (Custom Source)

166 views
Skip to first unread message

ochaunm...@gmail.com

unread,
Nov 28, 2018, 7:36:49 PM11/28/18
to mementodatabase


So I've been trying to figure out how to get info scanned from the barcode field to autofill fields like Name, description & model for entries. This is on the MementoDB android app. Here is what I have so far from my code. 

var jsonresult = http().get("https://api.upcitemdb.com/prod/trial/lookup?upc=" + query);


var name = JSON.parse(jsonresult.body)["items"]["title"];
//var details = JSON.parse(jsonresult.body)["items"]["description"];
//var model = JSON.parse(jsonresult.body)["items"]["model"];

result(name)


For the autofill rules, I have the property title as the property returned by the script and I have it to be saved to field Description.  I've gotten the code to work in the "IDE" with barcodes like 041294402293, but I couldn't get it to work in the app. I've looked at the wiki for help with this, but I just can't figure it out. 

ochaunm...@gmail.com

unread,
Nov 28, 2018, 9:58:39 PM11/28/18
to mementodatabase
NVM I found the answer in this post. I just changed my code to be more similar to this
Reply all
Reply to author
Forward
0 new messages