Paragraph and blank space when no value present
I have a paragraph rule where following properties are referenced in the below fashion
<<.City>>, <<.State>>, <<.Zip>>
The value for .AdressLine3 and AddressLine2 could be blank some times. When that propertty is null, system is introducing a blank line(s) between AddressLine1 and City,State,Zip.
Anything we can do to make the system not do that.
Appreciate all the help
***Edited by Moderator Marissa to update platform capability tags****
I tried and I am able to make it. Please follow below steps.
So you have paragraph rule like I show below.
When you display it shows like as shown below (IN PDF also same)
To remove the space for the properties which does not have values,
1) Use a condition when rule to display the property. i.e
Click on the magnifier icon of the property in paragraph rule, (on move hover you see that)
Once you click on the magnifier, you would see the following modal dialog, In the modal dialog, configure a when rule, I configured "PropEmpty"
PropEmpty when rule configuration is,
Repeat the step for all the properties those would go empty at runtime and you dont want to see the space reserve for them in the PDF or UI
2) Now, Go to paragraph rule, Click source. you see as shown below
Remove the following red highlighted content from the source
Now, Please move the <br/> tags to inside of when rule for the only properties configured with When rule, as shown below, this is the final code
Trunoff source mode (Click again on "Source" button), look like below
Save all the rules modified and run the scenario,
If I've the value in Addressline2 then it will look like
Thats it !! As you are generating the PDF out of the section, whatever you see in the section, same is posted to PDF. So, The same solution works for both PDF and UI
In case, you dont see the expected out come, Please revisit
a) Your paragraph source editing
b) When rules of the properties are properly configured and true when values are empty.
Please feel free to reply for any questions.
Keep up to date on this post and subscribe to comments
- Rule-HTML-Paragraph escapes spaces in pega:url
- If i want to remove ' ' from Rule-Html-Paragraph, but need space,what code i should implement?
- Getting Error $Is-Present(.version) rule-obj-when not found.When service is called then it throws and error that Failed to find instance XXXX-.$Is-Present(.abc) of type Rule-Obj-When.
- The Host session presentation space is protected or inhibited
- Blank space at the top of harness