I wonder if it would be easier to use Text Blaze's if/else command here. You can create if statements that make specific text to show up when certain circumstances are met within your snippet. I think that could be an easier solution.
{if: `singular/plural`="Singular"}This document is{elseif: `singular/plural`="Plural"}Those documents are{endif} available under the "Property Documents" section. You will have to create a profile to download {if: `singular/plural`="Singular"}it{else}them{endif}.
Thanks for the response Dylan! I guess my main question is more about how to spit out those results:
"POS"
"Lease(s)"
"Rent Roll"
With a "+" or "," between them, if there is more than one document that is to be inserted/available.
And without anything after it, if only a singular document is available.
I would be inserting my previously attempted formula where "diffdocs" is inserted in the snippet below:
And then, if possible, it would be great to have that same portion/identifier/code which adds the "+" or "," in between the multiple documents, also determine whether the rest of the description should be plural or singular.
{if: includes(diffdocs, "POS") or includes(diffdocs, "Lease(s)") or includes(diffdocs, "Rent Roll"); trim=yes}
The {=join(diffdocs, ", ")} for this property {if: count(diffdocs)>1}are{else}is{endif} available.
Please make sure you have reviewed {if: count(diffdocs)>1}them{else}that{endif} and are okay with accepting/assuming before signing your offer.
{if: count(diffdocs)>1}These documents are{else}This document is{endif} available under the "Property Documents" section. You will have to create a profile to download {if: count(diffdocs)>1}those documents{else}that document{endif}.{endif: trim=yes}
@ajduna7 Please try this one and let me know if it works for you.
join([text for text in ["POS" if `pos available` = "yes" else "", "Lease(s)" if `Lease Available` = "yes" else "", "Rent Roll" if `Rent Roll Available` = "yes" else ""] if text<>""], ", ")