Profile picture for user cfdutoit

Hi,

 

I am trying to have formatted text output using the "OutputFormattedText" function to be justified in the Word document. I do not see text alignment when changing the attribute.

I tried adding a formatted paragraph, but it gives an error when trying to output the formatted text:

"Error while executing script:

Script: formatting, line 14

OutputFormattedText: You cannot use an OutputFormattedText method within a paragraph or list."

I also tried manipulating the HTML format, but it ignores any justification settings.

Any ideas would be appreciated.

Thank you,

Francois

by Vladimir Bis
Posted on Mon, 02/27/2012 - 13:43

Hi Francois,

if you still didn't resolve this problem please paste your code here.

0
by Sadiq AL-Shara
Posted on Thu, 05/31/2012 - 12:18

Hi,

My main goal is to output in a report the styled text value of an attribute (most importantly numbering/bulleting) in a different font, font size, and font color from what the attribute originally exists in the database, example:

Attribute as it exists in the database:

Attribute as it should be outputted in the report:

The only solution I could find was to:

  1. Add a font format in the database with the desired settings
  2. Retrieve the attribute using getHTMLFormattedValue()
  3. Merge the retrieved attribute with the font format added to the database using getMergedFormatting
  4. Outputing the result with getHTML using OutputFormattedText

The code is something like the below:

var nLocale = Context.getSelectedLanguage()
var p_aModel = ArisData.getSelectedModels()
var p_StyledValue = p_aModel[0].Attribute(Constants.AT_NAME, nLocale).getHTMLFormattedValue())
var FontList = ArisData.getActiveDatabase().FontStyleList()
p_StyledValue = p_StyledValue.getMergedFormatting(FontList[0].Font(nLocale) )
p_output.OutputFormattedText( p_StyledValue.getHTML() )

Everything worked perfectly except for one hiccup: the final result magically had an indentation before the output by 6mm, example:

Edit: After more research, the issue is with bulleting an attribute itself, where it inserts the indent by default, hence I don't think there is a way to manipulate this indentation

0
by Stefano Pulliero
Posted on Wed, 04/24/2019 - 15:56

Is there a method to manipulate a text HTML retrieved in an attribute using getHTML() method? I wish output the result manipulated using OutputFormattedText

 

0

Featured achievement

Rookie
Say hello to the ARIS Community! Personalize your community experience by following forums or tags, liking a post or uploading a profile picture.
Recent Unlocks
  • SS
  • MZ
  • Profile picture for user kbiront
  • Profile picture for user Tony Iliev
  • Profile picture for user amandeep.7.singh
  • 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