Jump to content
Claris Engage 2025 - March 25-26 Austin Texas ×

This topic is 7445 days old. Please don't post here. Open a new topic instead.

Recommended Posts

Posted

Using [color:"green"] TextStyleAdd(someField; Bold) works just fine to make the text in someField bold...

When I try to make it dynamic and have a field named itemStyle where the user chooses from a list, Bold, Italic, etc. then use the syntax:

[color:"green"] TextStyleAdd(someField; itemStyle) then it does not work. What am I missing? "Normally" we can pass the value of a field as a parameter. I checked to be sure that the result is text. I also tried using GetField("itemStyle") within the function, but no go.

Posted

OK. I started nesting the functions as I want to be able to set the font, size, and style on the fly. The Calc is used in a SetField script step. The size and style work fine but I cannot get it to manipulate the font. I checked to make sure the font name taken from a list is spelled correctly and case sensitive. Can you see a flaw in what I have?


/* Calc for setting the numbers with TextStyle, TextSize, and TextFont 

   Dynamically set from the order page, fontStyle, fontSize, fontName */

TextFont(

  TextSize(

    TextStyleAdd(

      NUMBERS::someField;

          Evaluate(ORDERS::fontStyle) ); 

          Evaluate(ORDERS::fontSize) ); 

          Evaluate(ORDERS::fontName) );

)

/* End Calc */

Posted

I don't think you need to Evaluate the fontSize or fontName, the fontSize is just a number and the fontName is just a string - so those two will work without Evaluate() on them.

This topic is 7445 days old. Please don't post here. Open a new topic instead.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.