Different parameter in single label

hello, i hve issue to solve this problem

my config on device page

  • label: “‘WAN IP Connection’”
    parameter: InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection
    type: “‘parameter-table’”
    childParameters:
    • label: “‘WAN Mode’”
      parameter: ConnectionType
    • label: “‘WAN Name’”
      parameter: Name
    • label: “‘Mode IP’”
      parameter: AddressingType
    • label: “‘Status Koneksi’”
      parameter: ConnectionStatus
    • label: “‘Enable WAN’”
      parameter: Enable
    • label: “‘IP Address’”
      parameter: ExternalIPAddress
    • label: “‘Gateway’”
      parameter: DefaultGateway
    • label: “‘DNS’”
      parameter: DNSServers
    • label: “‘NAT’”
      parameter: NATEnabled
    • label: “‘Service’”
      parameter: X_ZTE-COM_ServiceList
    • label: “‘Enable VLAN’”
      parameter: X_ZTE-COM_VLANEnable
    • label: “‘VLAN ID’”
      parameter: VirtualParameters.hwVlan

and virtual parameter like this

const now = Date.now();
let productClass = declare(“DeviceID.ProductClass”, {value: 1}).value[0];
let client = “”;

switch(productClass) {
case “EG8145V5”:
client = declare(“InternetGatewayDevice.UserInterface.X_HW_WebUserInfo.1.UserName”, {value: now}).value[0];
break;
case “F670L”:
client = declare(“X_ZTE-COM_VLANID”, {value: now}).value[0];
break;
case “model3”:
client = declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.Username”, {value: now}).value[0];
break;
default:
client = “not supported”;
}

there is no display any vlan id, please help to resolve this problem.

thanks

You have not referenced the correct parameter path. Try this:

client = declare("InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.X_ZTE-COM_VLANID", {value: now}).value[0];

stil no display any vlans id

there is updated config
const now = Date.now();
let productClass = declare(“DeviceID.ProductClass”, {value: 1}).value[0];
let client = “”;

switch(productClass) {
case “EG8145V5”:
client = declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANIPConnection.1.X_HW_VLAN”, {value: now}).value[0];
break;
case “F670L”:
client = declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.2.X_ZTE-COM_VLANID”, {value: now}).value[0];
break;
case “F660”:
client = declare(“InternetGatewayDevice.WANDevice.1.WANConnectionDevice.2.WANPPPConnection.1.Username”, {value: now}).value[0];
break;
default:
client = “not supported”;
}

This will never work. A parameter-table takes a single base path, in your case InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection and can reference parameters underneath that path. So under the covers, you are really attempting to reference the path InternetGatewayDevice.WANDevice.1.WANConnectionDevice.1.WANIPConnection.VirtualParameters.hwVlan which obviously doesn’t exist.

Add this to the parameter-list for the device page:

    - label: "'VLAN ID'"
      parameter: VirtualParameters.hwVlan

i need just check if ZTE F670L product then return X_ZTE-COM_VLANID on table VLAN_ID, and if Huawei it’s return X_HW_VLAN