combo setValue when value is 0 int - throws 'e.replace is not a function'

A combo I have defined in markup gets its initial item selected once the backend makes it available, at which point I call setValue(), which throws ‘e.replace is not a function’ and no item is selected

html

<div view="combo" id="neverNotifiedPeriodCombo" 
webix-data="periodOptions" 
label="{{'Period'|translate}}" label-width="200" ></div>

controller

$scope.periodOptions = [
 { id: period.day, value: vm.translations.Days }, 
 { id: period.week, value: vm.translations.Weeks }, ...];
// where period.day is 0

...

$$("neverNotifiedPeriodCombo").setValue(neverNotifiedConfig.Period);
// where neverNotifiedConfig.Period is 0, same as period.day, 
// therefore the selected item should read vm.translations.Days

How do I select a combo item programmatically?

Hello,

Actually, in Webix 0 ids should be avoided, as we do not process them. As a result, the suggest list cannot find the corresponding option. Please, try using string “0” as an ID at least.

If it does not help, would you please show us the problematic snippet?

ok so based on your input, all our backend and js enums (angular constanst) are now 1-based - that keeps us out of trouble, many thanks

your answer also hints at why a text container does not like a 0 int as its value (.toString() is required)