Search Tips and Tricks

Login to search and find more tips.

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
{
    ""
}

Submit a tip

Do you have a useful tip to share? We'd love to hear it! Simply use the Feedback form to submit a tip and we'll add it here to help the XMPie community.