Application Development Discussions
Join the discussions or start your own on all things application development, including tools and APIs, programming models, and keeping your skills sharp.
cancel
Showing results for 
Search instead for 
Did you mean: 

smartform condition

AJeB
Participant
0 Kudos
988

how to change the fontsize of smartform output text depends on variable

i tried this one but not working
ZX fontsize is 6pt
X2 fontsize is 9pt

1 ACCEPTED SOLUTION

Maciej_Domagała
Contributor
938

Such commands - preceided by characters 😕 (like 😕 IF 😕 ELSE, etc.) - do not work in Smartforms at all.

Instead you can put a condition in the specific node of a form, for example in a text node. You can define it in a "Conditions" tab. If you define a condition, then the node will be output only if the condition is satisfied.

So you can define two text nodes in your smartforms tree, both containing the same text, but each one with its own formatting/font size - and each one with its own condition, opposite to each other.

Or instead: you can create a node that itself functions as an "if" command (context menu: Create-> Flow Logic-> Alternative). Then you define only one condition: in the "General attributes" of the "Alternative" node.

7 REPLIES 7

Sandra_Rossi
Active Contributor
0 Kudos
938

Deleting my answer as the issue is about your IF, and my answer is about SAPScript.

Plain wrong: You did it correctly. But of course, how you did it, ZX and X2 must be "character formats", and not "paragraph formats" (paragraph formats can be used instead of star character on the left).

Plain wrong: But there may be a "font substitution" (A.K.A. "font conversion"), based on the font family you have selected and the fonts which are supported by the output device type (or by your Windows laptop if it's print preview). It's discussed in the forum. There is a function in SE73 to see the effects of font conversion for a given output device type. I think there are also some SAP notes which describes the different logic which operates in the print preview.

938

This is the SAPScript method, not the smartforms method ...

0 Kudos
938

X2 and ZX is character format

Maciej_Domagała
Contributor
939

Such commands - preceided by characters 😕 (like 😕 IF 😕 ELSE, etc.) - do not work in Smartforms at all.

Instead you can put a condition in the specific node of a form, for example in a text node. You can define it in a "Conditions" tab. If you define a condition, then the node will be output only if the condition is satisfied.

So you can define two text nodes in your smartforms tree, both containing the same text, but each one with its own formatting/font size - and each one with its own condition, opposite to each other.

Or instead: you can create a node that itself functions as an "if" command (context menu: Create-> Flow Logic-> Alternative). Then you define only one condition: in the "General attributes" of the "Alternative" node.

0 Kudos
938

do you have a links / blogs about this?

i dont know how to do this

0 Kudos
938

There is a documentation for Smartforms at help.sap.com, for example:

Node Types

Attributes of the Node Types

regards

Sandra_Rossi
Active Contributor
0 Kudos
938

If you test without /: condition, only using, does it work?

*  <ZX>test font 6pt</>
*  <X2>test font 9pt</>

If it works, then the problem is about using /: in Smart Forms. It works only in SAPScript.

If it doesn't work, see my "plain wrong" answer.

Simple as that.