1

Search in profile fields using sdk

Тема: Search in profile fields using sdk

Hello, everyone
at first, Happy new year smile

I wanna search for vehicles by profile field for specific field_name like "year" or "registeration_plate",
This is not working, when i wrote the doc, i understood that i can set  like this:
propName : "rel_profilefield_name",
propValueMask : "registration_plate:value",

this is my code :

        SearchSpec searchSpec = new SearchSpec();
        searchSpec.setItemsType(Item.ItemType.avl_unit);
        searchSpec.setPropName("rel_profilefield_name"); //sys_name
        searchSpec.setPropValueMask("registration_plate:"+v.trim());
        searchSpec.setSortType("rel_profilefield_name");
        searchSpec.setPropType("profilefield");

But this not going to work, what is the problem please?


thanks

2

Search in profile fields using sdk

Re: Search in profile fields using sdk

Hello Fadi,

To search vehicles by profile field name and its value it needs to specify propName as rel_profilefield_name_value
propType the same as propName or 'property'

for example,

propName:"rel_profilefield_name_value",
propValueMask :"registration_plate:value",
propType:"rel_profilefield_name_value"  // or "property"

Happy New Year too! smile
ps. documentation has been fixed.

Diana Cheley
Wialon Hosting Expert
Gurtam
3

Search in profile fields using sdk

Re: Search in profile fields using sdk

Thank you very much,
it is working now smile


regards