Script for update between custom data and custom attribute

Solved
R
rathasatekun
Gosoft (Thailand) Co.,Ltd.

I have use case that

I create custom data with ini file for input data by user for new device by get value from message box example device_group and user input “north”

and I have import custom attribute for existing device example device_group  “north” , “south”

so, finally I want to update between  custom_data and custom_attribute

Copy %customAttr:device_group% to %CustomData:device_group% 

and

Copy %CustomData:device_group% to %customAttr:device_group%

a year ago
SOTI MobiControl
ANSWERS

Why not using the custom data directly? no need to copy it into a different field

ZC
Zafer Cigdem
a year ago

I agree with Rafael,

If you have a specific need for these, please share more details.

R
rathasatekun
a year ago

why i use both ?

because of  I have 2 types of devices

one of new device and one of existing device (about 100,000 Devices in server).

For, new device i have application for user input text and then update into ini file for custom data.

but current or existing device. i dont want to end user input all, I will lookup data from csv file into device id  and then import Cutom Attribute. 

I understand that Custom data it is from client side (save as ini file) and Custom Attribute is from server side.

or you have other solution for user input data and save into Custom Attribute or import Custom Data from server side?

ZC
Zafer Cigdem
a year ago

Hi,

As you mentioned, it's better to use as 2 different ways. Because these are 2 different methods but there are some advantages depending on the use-cases, so you can prefer which one is better for you, or if you can share your use-cases we may help as well. Briefly, I do use custom attribute for bulk import data and for other use cases I do prefer custom data for my needs. 

Custom data --> when user input needed (or you can collect data from device using JS scripts or such; it's out of topic at the moment)

Custom attribute -> you can do bulk import/export. You can find more details here related to custom attribute: SOTI Discussion Forum

if you have any other question please let us know.

Zafer

Solution

I agree with Zafer, and we do the same:

Custom data collecting data generated by client device (with or without user input doesn't care) and can't be provided static via console. This data will stay until you change the relvant data in the local stored ini or xml file. So no need to copy it to somewhere else. We use this for device relocation and device naming for example.

Custom attribute is used for static data (based on data entered per folder) which is grabbed by scripts or app policys to do stuff with that like app policy, device pins and so on.

A
AMMOD@SOTI
a year ago

Hi Rathasatekun,

Thanks for posting on SOTI Pulse, Thanks Rafael, and Zafer for responding to the post, your expertise and willingness to help are greatly appreciated!

Have you had an opportunity to test the suggested solutions by Raymond and Zafer, and has it successfully addressed your query?

If not, or If you have any additional questions or concerns, please don't hesitate to reach out. We're dedicated to providing assistance and support.

Kind regards