cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

How to add default suffix to entity name?

SaiSameera
12-Amethyst

How to add default suffix to entity name?

Hi,

I want to give entity name as TreeThing_abc where _abc is the suffix. Whenever I want to give the name for any entity, _abc should come by default and then I'll add the prefix name based on the entity that I create. Is there any possibility to get default name for entity name.

 

thanks

sameera

1 ACCEPTED SOLUTION

Accepted Solutions

You just need to use CreateThing snipped and add the desired sufix:

var sufix = "_mySufix";

Resources["EntityServices"].CreateThing({

  name: "myCustomName"+sufix,

 description: "",

  thingTemplateName: "GenericThing",

  tags: undefined

})

View solution in original post

6 REPLIES 6

Not with the Composer, but you can create a custom service in order to create entities and in this service add the suffix by the rules you desire, it's how we do it.

Thanks CarlesColl

Is there any snippet to add suffix for entity name.

 

Thanks

sameera

You just need to use CreateThing snipped and add the desired sufix:

var sufix = "_mySufix";

Resources["EntityServices"].CreateThing({

  name: "myCustomName"+sufix,

 description: "",

  thingTemplateName: "GenericThing",

  tags: undefined

})

Hi CarlesColl,

I'm able to create a thing with the suffix. But I want to get the suffix whenever I click on the name to create a thing or ThingTemplate or any entity.

That's what I said on my first answer that can't be done through the Composer.

tcoufal
12-Amethyst
(To:SaiSameera)

You can create a Mashup utilizing your custom services. Then you can assign this mashup as your home mashup in your HelperThing. And access it simply by clicking on HomeMashup in EntityInformation section. 

Top Tags