In my /lib/collection.js SimpleSchema. I am using autoValue to return a reactive var value. The console log gives the right value, but the return value shows "0" Please help!
autoValue: function() {
console.log(ItemCloudIDVar.get());
a = ItemCloudIDVar.get();
return a;
}
Solve this, somehow the reactive var was clearing itself every time I submitted the form, cause it to return 0
So what I did was to place in the variable value up front on the frontend form through a helper(ItemCloudIDHelper) instead of through simpleschema backend.