Featured tip
Add possessive "s" with or without apostrophe
[QLingo,uProduce,uCreate Print,uStore,uPlan][Steve Couch][30 Mar 2025]
How to show ownership by adding apostrophe + "s" or just apostrophe:
if (Length(Trim(|->[name])) > 0) //make sure there is at least one letter in the name
{
if (SubString(Trim(|->[name]), Length(Trim(|->[name]))-1, 1) = "s") //is the last letter of the name "s"?
{
Trim(|->[name]) & "'" //if yes, just put apostrophe
}
else
{
Trim(|->[name]) & "'s" //if no, put apostrophe and then "s"
}
}
else // name is empty
{
""
}