MA

Hi,

i created multiple Texts by using CreateTextOcc in a single model. I can change the text style of system attributes fine with the setStyledValue method:

var model = ArisData.getSelectedModels()[0]

var modellnameValue = model.Attribute(Constants.AT_NAME, lang,true).GetValue(true)

var modelNameText = model.CreateTextOcc(120,200,Constants.AT_NAME)

modelNameText.TextDef().Attribute(Constants.AT_NAME,Context.getSelectedLanguage()).setStyledValue("<p><b>"+modellnameValue+"</b></p>")

 

Creating the Texts for user defined attributes work as well similarly

var modelDateNum = ArisData.ActiveFilter().UserDefinedAttributeTypeNum("7ec51830-1a99-11e1-54b1-0050569e0006");

model.Attribute(modelDateNum,Context.getSelectedLanguage(),true).setValue("")

var modelDateValue = model.Attribute(modelDateNum,Context.getSelectedLanguage(),true).GetValue(true)

var modelDateText = model.CreateTextOcc(100,100,modelDateNum)

 

but i can't figure out how to change the text style of user defined attributes.

by Armin Nosbüsch
Posted on Fri, 11/22/2019 - 14:39

First, be aware that you change the style on definition level, not only on the occurrence level with this statement: Attribute(Constants.AT_NAME,Context.getSelectedLanguage()).setStyledValue("<p><b>"+modellnameValue+"</b></p>")

Attribute-Styles can only set for text attributes, independent if standard or user defined attribute.

In your example you try to format a user defined attribute of type date (modelDateNum), but a date cannot changed to html-text format.

0

Featured achievement

Genius
You like to help others solve their problems by answering questions.
Recent Unlocks
  • KF
  • KH
  • RG
  • Profile picture for user Vee_ARIS
  • Profile picture for user smarty
  • PacMan

Leaderboard

|
icon-arrow-down icon-arrow-cerulean-left icon-arrow-cerulean-right icon-arrow-down icon-arrow-left icon-arrow-right icon-arrow icon-back icon-close icon-comments icon-correct-answer icon-tick icon-download icon-facebook icon-flag icon-google-plus icon-hamburger icon-in icon-info icon-instagram icon-login-true icon-login icon-mail-notification icon-mail icon-mortarboard icon-newsletter icon-notification icon-pinterest icon-plus icon-rss icon-search icon-share icon-shield icon-snapchat icon-star icon-tutorials icon-twitter icon-universities icon-videos icon-views icon-whatsapp icon-xing icon-youtube icon-jobs icon-heart icon-heart2 aris-express bpm-glossary help-intro help-design Process_Mining_Icon help-publishing help-administration help-dashboarding help-archive help-risk icon-knowledge icon-question icon-events icon-message icon-more icon-pencil forum-icon icon-lock