So I’m looking up the row by the name, returning a list of every item in that list, for instance the row JOE TEST has the following output:
Content
leadvolume: JOE TEST, _cokwr: 0, _cpzh4: 0, _cre1l: 0, _chk2m: 0, _ciyn3: 0, _ckd7g: 0, _clrrx: 0, _cyevm: 0, _cztg3: 0, _d180g: 0, _d2mkx: 0, _cssly: 0, _cu76f: 0, _cvlqs: 0, _cx0b9: 0, _d9ney: 0, _db1zf: 0, _dcgjs: 0, _ddv49: 0, _d415a: 0, _d5fpr: 9, _d6ua4: 0, _d88ul: 0, _dkvya: 0, _dmair: 0, _dnp34: 0, _dp3nl: 0, _df9om: 0, _dgo93: 0, _di2tg: 0, nov: 0
Where are values, except _d5fpr: 9,
are 0.
Then I have an input that receives a time/date stamp, formats it to {dd}-{Mon} in the format date field, so the test lead I just put in is 21-Nov.
This matches the output for d5fpr:
which is outputting 9. So I want to only update the 21-Nov field, created a code service using the output of the date,
Inputs:
date {{date_time_format_date.date}} // this is the formatted date output collection
twentyone {{look_up_row_by_vertical.gsx:21nov}} //the result of row lookup, column title 21st november
Code
var date = inputs.date;
var twentyone = inputs.twentyone;
if (date == "21-Nov") {
resolve(twentyone);
}
Inputs
{
"date": "21-Nov",
"twentyone": ""
}
But it’s not picking up the value. It’s returning blank rather than the expected 9.
Using the value, i then have another code service to take that output, add one and return it:
var currentLeads = inputs.currentLeads;
currentLeads++
resolve(currentLeads);
so in theory it should work if the 9 was being picked up because currently it’s only returning 1 (0+1).