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

Community Tip - Visit the PTCooler (the community lounge) to get to know your fellow community members and check out some of Dale's Friday Humor posts! X

Get style information of style definition

drichter
14-Alexandrite

Get style information of style definition

It it possible to get style information of a style definition entity in a service?

5 REPLIES 5
supandey
19-Tanzanite
(To:drichter)

Hi @drichter I don't see any OOTB service available for this, would it be possible for you to share short comment on what the use case is?

Digging a bit with the services, if you use GetDifferencesAsJSON service you can get difference styling between a base style and the given one, you get something like this where you can get the styling, crappy but it can work:

 

Screenshot 2018-05-16 11.55.30.png

Sorry it's the old value, your code should look something like this:

 

// -- where styleName contains the Style Name for which you want to recover style content
var data =  StyleDefinitions[styleName].GetDifferencesAsJSON({ otherEntity:"DefaultMashupStyle" });
var result =data.rows[data.rows.length-1].difference.rows[0].oldValue.value;
drichter
14-Alexandrite
(To:CarlesColl)

Thanks, I will try this later if I had more time.

drichter
14-Alexandrite
(To:supandey)

I use the grid advanced with a non specified infotable as input. To use this without defined datashape you need to specified the columns and the styles via json. To have the same styles in every view I want to use the style definition entity.

Top Tags