cancel
Showing results for 
Search instead for 
Did you mean: 

How to get rid of blank space using templates in smartforms

former_member215563
Active Participant
0 Kudos


Hi Experts,

I have used a template to display the below:-

Tot Prod5454545.00
Tot TAx45454.00
Total VAT32.45

I have added a condition that if any of the above three rows has a blank value.It should not get displayed.

However , lets say that if the field Tot Tax = 0.00 then its coming as below with blank space.

Tot Prod5454545.00
Total VAT32.45

I want to get rid of the blank row. How can I achieve this.?

Thanks,

Faiz

Accepted Solutions (0)

Answers (1)

Answers (1)

romit_raina
Active Participant
0 Kudos

Hello

One of the solutions which I got from your problem is using ALTERNATIVE inside the Template.

For your example need to put 4 ALTERNATIVE based on the combination of your respective 3 Fields.

Combinations are:

  • Tot Prod + Tot TAX + Total VAT
  • Tot Prod + Tot TAX
  • Tot Prod + Total VAT
  • Tot TAX + Total VAT

Above combination is the values which you are getting inside the template like for Total Prod = &wa_TotProd&, for Tot Tax = &wa_toTax&  and for Total Vat = & wa_ToVAT&.


Now create the 4 conditions and in the general tab put the above combinations. Below images will help you to do so:


Now in the General Attribute Tab in CONDITION 1 (ALTERNATIVE) put condition as shown below:

This condition will trigger when all 3 fields are not initial.


Inside Alternate Node create text field in TRUE like below :

In the Output option tab of above text mention , in the Output structure put Line = 1 & Column = 2.

This will print the text in 1st Row & in 2st Column.

For Second text Total Tax, in the output structure put Line = 2 & Column = 2

For Third text Total VAT, in the output structure put Line = 3 & Column = 3.


--------------------------------------------------------------------------------------------------------------------------------

Now same for rest of the ALTERNATIVE:

For CONDITION2 parameters are:

This condition will only trigger when TOTAL PROD & TOTALTAX fields are not initial & will display same


Inside this Alternative put two text field which is shown as below:

Mention same as mentioned for the CONDITION 1 text.

For 1st text it will be Line 1 & Column 1, for second text it will be Line 2 & column 2.

---------------------------------------------------------------------------------------------------------------------------------


For Condition3



This condition will only trigger when TOTAL PROD & TOTAVAT fields are not INITIAL & will display same.

Inside the Alternative put two text fields which is shown as below :

Mention same as mentioned for the CONDITION 1 text.

For 1st text it will be Line 1 & Column 1, for second text it will be Line 2 & column 2.


---------------------------------------------------------------------------------------------------------------------------------

For Condition4


This condition will only trigger when TOTAL TAX & TOTAVAT fields are not initial & will display same.



Inside the Alternative put two text fields which are shown as below:

Mention same as mentioned for the CONDITION 1 text.


For 1st text it will be Line 1 & Column 1, for second text it will be Line 2 & column 2.





Yes this is long process but once yo understand this will solve your problem, let me know if you have any question.



Thanks

Romit Raina