This is another clever scam, and a variation was also featured on BBC's the Real Hustle a few years ago, same as the Barcelona Dancing Dollies scam. My uncle fell victim to this scam around 8 years ago in Gaudi's Park Güell. It's often known as the bird poo scam, the mustard scam, etc. So I'll give his version.
Whilst walking in Park Güell with my young cousin, 2 men aproached him, and in very broken English, drew attention to the fact that my uncle had what appeared to be bolognaise sauce on his shoulder (his words, not mine). This gives you an immendiate distraction, and makes you wonder where have you been, where could this have come from, etc. Out of nothing, this helpful citizen produces a bottle of water and some serviettes, and at the same time points out that my cousin has a similar stain on her backpack and along her shoulder. So hey, here's an idea - I'll clean your back and you clean hers - considering that neither of you can reach.
You can guess where this is going, and yet again, is seems soooo easy to spot now, but this has been going on for years, and is still a killer. The scammers have been hiding behind bushes/wall, etc. and usually squirt whatever the substance is from a distance, and then approach you. As you can imagine, in the "cleaning and rubbing" of jackets and backpacks, wallets were lifted, and the guys make a speedy escape. My uncle even incredulously told me that he thought the guys were so kind and helpful that he thought to at least tip them for the bottle of water they had used to help clean the mess! As always, there are many an escape route, and as soon as my uncle realised his mistake, the theives were long gone.
As I mention, variations have been seen on Las Ramblas, for example with the mayonnaise and mustard sachets from the fast food chains, and salted water being used as saliva. etc.
Rule is: if someone approaches you to attempt to "help you clean something off your person" or any kind of unsolicited help, be aware of those others around you - these people rarely work alone, and the pass off is the key to the scam working. Often even if you catch up with the real pickpocket, the goods have been passed on maybe once, maybe twice - leaving you no cause for reclaiming or making a scene.
For more information on Barcelona, see this Barcelona Guide.
Barcelona apartments for groups