Plugin Editor - Field Properties issue


I am building a plugin and I have created fields called level1_interval_s,level1_interval_m and level_1_max.

But when I try to access them from the switch statement it is showing NaN or Undefined.

Can Anyone help ? , below is a sample of the code

let intervalM;
let intervalS;
let maxShuttles;
switch (level) {
case 1:
intervalM = Number(properties.level1_interval_m);
intervalS = Number(properties.level1_interval_s);
maxShuttles = Number(properties.level_1_max);

Are you sure they’re available when the code executes? Are these in your update function?

Nope they are not in the update function.

What exactly should be in the update function ?