Hello,
I have a records in tempTable and I'm trying return a records from temTable if there is doesn't exist a match in the second table(CustTable). It works below code but the all values starting from 603 in below code always return twice where first two values 11102206","12104348" already exists in first & second table and its not returns value as expected. But I have issue values keep repeating. I'm expecting single output("603","604","605","606","607") but its not works as expected. Please advise.
static void readJSON(Args _args) { mapEnumerator mapEnumerator; Map data; List testList; str _jsonStr; container test; ListEnumerator listEnumerator; int containerList; Map map1; int lengthIterate; CustTable custable; TempMirnahCust tmpMirnahCust; str _conpkrsult; ; _jsonStr = '{"branchList":["11102206","12104348","603","604","605","606","607"]}'; data = RetailCommonWebAPI::getMapFromJsonString(_jsonStr); mapEnumerator = data.getEnumerator(); while (mapEnumerator.moveNext()) { switch (mapEnumerator.currentKey()) { case "branchList" : test = mapEnumerator.currentValue(); testList =List::create(test); listEnumerator = testList.getEnumerator(); while (listEnumerator.moveNext()) { test = listEnumerator.current(); _conpkrsult = conpeek(test, 1); tmpMirnahCust.MirnahCode = _conpkrsult; tmpMirnahCust.insert(); while select tmpMirnahCust where tmpMirnahCust.dataAreaId == custable.dataAreaId notexists join custable where custable.MirnahCode == tmpMirnahCust.MirnahCode { print tmpMirnahCust.MirnahCode; pause; } } break; } } }