Leave feedback
  • Question

    Help with function SetFontProperties

Enter a new topic
  • Aristar Borg Aristar Borg
    0 likes 693 views
    Dear all, I need some help with this function: SetFontProperties. What I want to do is that while showing the elements in an array through a repeater/substitution, if a certain value is encountered, it should be shown as bold. It's not working for me though, am I using it correctly? I am attaching some images to illustrate better. Thank you. Best regards Aristar Monday 28 March, 2016
  • Aristar Borg Aristar Borg
    0 likes

    Attachment here.

    Monday 28 March, 2016

    Attached files

  • Vyv Lomax Vyv Lomax Administrator
    0 likes

    Hi there - you are using a PageOUT function in StoryTeller.

    Try the StSetProperty() function instead.

    Good luck!

    Tuesday 29 March, 2016
  • Aristar Borg Aristar Borg
    0 likes

    Hi Vyv

    Can you please indicate how tu use this specifically to make the text bold. I am trying various things without any success. I tried the script both on the row and the substitution. Also cannot gather much relevant info for my case from the help and forum.

    thanks
    Aristar

    Tuesday 29 March, 2016
  • Peter Martens Peter Martens StreamServe Employee
    0 likes

    Hi Aristar,

    Have you tried to put a modification on the Bold property of the text?

    Regards,
    Peter

    Tuesday 29 March, 2016
  • Aristar Borg Aristar Borg
    0 likes

    Hi Peter/Vyv

    have been trying that as well but its not working. What I want is very simple and I have been able to make it work to make the cell's bottom line red (as an example), if the value is equal to "Consumption"

    if ( toupper($v_item_BILL_GROUP_DESC) = toupper("Consumption")) { StSetProperty("Cells[0]/BottomLineColor", "RGBA(255,0,0,255)"); } I want the same thing to happen but instead of a red line I want the variable to be bold. What do I have to put in StSetProperty? Thanks Aristar

     

    Tuesday 29 March, 2016
  • Peter Martens Peter Martens StreamServe Employee
    1 likes

    Hi Aristar, 

    The only way I got this to work is to use a modification directly on the Bold property. If I remember correctly the variable had to be true or false. 

    See also the attached screenshot.

    Regards,
    Peter

    Thursday 14 April, 2016

    Attached files

  • Aristar Borg Aristar Borg
    1 likes

    Hi Peter

    thanks for your help. I have managed to make this work. The only thing is that the Character properties take 0 or 1 as numbers not boolean values. So my script sets the variable to either "0" or "1" according to the value in the array.

    if ( toupper($v_item_BILL_GROUP_DESC) = toupper("Consumption"))
    { $fontWeight = "1";
    } else
    { $fontWeight = "0";}

    Then I convert to a number in the modification as shown in the attached. The Bold tick box should be left unticked.

     

    Best regards
    Aristar

     

    Monday 18 April, 2016

    Attached files