devrename command with 2 custom attributes

BP
Bruno P.
Hub One SA

Hi evreyone,

I've tried to rename some devices using custom attributes.

My devices have 2 custom attributes : "ville" and "restaurant", with data set as text.

I've tried to send this script in legacy mode : devrename "Device_%CustomAttr:ville%_%CustomAttr:restaurant%

The device is well renamed but only the first custom attribute is used.

Result : device_ville_

Is there a way to combine multiple custom attributes to rename the device ?

3 years ago
SOTI MobiControl
ANSWERS
RC
Raymond Chan Diamond Contributor
3 years ago

I did some short tests earlier today and found the same problem as yours on a test/demo server.  What are the version and build numbers of your MobiControl server?

My initial tests done also showed that there are different error patterns for different combination of custom-attribute types, and may be specific to the script command "devrename" or has a larger scope. In any cases, getting a permanent fix may take some time, and there might be a need to upgrade both the MobiControl server and a larger number of device agents.   Some temporary workaround might be possible.  Would you mind sharing the following information for your case:

1. The number of devices to be renamed?

2. Are both custom attribute "ville" and "restaurant" both configured to have value sent to the devices

3. The number of possibility for the value of custom attribute "ville"?

4. The number of possibility for the value of custom attribute "restaurant"?

5. Do the positive values of custom attribute "ville" and "restaurant" include any special character (i.e. other than the 26+26+10 alphanumeric characters)?  If so, what are the the characters used? 

6. The device platform/mode (Managed-device? COPE? BYOD? classic OEM-specific Android+)?

7. The brand/model(s) of the devices to be renamed?

RS
Rafael Schäfer
3 years ago

We do this with custom data and this works fine with multiple ones.

Try to use them in a showmessagebox script to display the values or just switch order to check if it's not because 2 are used but because "restaurant" is empty (for example).

RC
Raymond Chan Diamond Contributor
3 years ago

Using custom data to do renaming is one possible workaround, but require relatively big overhead (compared to script workaround)  to set up device-dependent .xml/.ini file to each related deployed devices, especially when the number of devices involved is large.

Casually suggesting that some empty custom attribute can be the possible cause of the problem is an insult of intelligence of other users of this forum, especially for someone who has not put any effort into  actually duplicating and investigating the problem on real hardware.