- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Quote Template - Merge Field - Sort Order
Anybody has experience how to sort blank rows to the bottom? I try ASC and DESC, the blank rows always come at the top.
Also, if I can completely take out those blank rows, it would be great. The blank rows are generated by "IF" statement; if it fits certain criteria, return blank instead. Does anybody have experience with this?
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: Quote Template - Merge Field - Sort Order
We don't have a use case where we return a blank value and so we get by with the ASC and DESC on the standard fields.
However, we've often thought about creating a "Sort Order" custom field on the charge in SFDC on the quote to dictate a more customizable sorting of products. You could use the same if then statments to render blanks and then populate the sort order value to 2. The for the products that do display you can populate them with 1. Then on the template you can sort by the custom field, 1-2 plus any addtional sorting fields. In my head, that seems like it would work. Let me know if that makes sense.
Maybe if someone does return blank values, they'll offer up their solution.
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: Quote Template - Merge Field - Sort Order
Thank you ehavens,
Do I have to include the "Sort Order" custom filed in the template to be able to sort on it?
Let's say if I have to, is there a way to format it as color White, so it blends it as if it is blank?
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Email to a Friend
- Report Inappropriate Content
Re: Quote Template - Merge Field - Sort Order
@taowu0201 If you have entirely blank rows you could hide them using my technique for conditional rows found here: https://community.zuora.com/t5/Zuora-CPQ/Quote-Template-Sample-with-Advanced-Customizations/td-p/157...
I also have not had expeience with sorting blank fields directly but the method @ehavens mentioned should work: Using a custom formula field in Salesforce. You would have a formula that detects if blank and sets the value to 0 for example and otherwise sets it to 1. Then you can sort by your sort field. In our quote we use several formulas like this to sort based on product type, category, etc.