I love it when in the course of an average day you have that moment when the light bulb gets turned to on, the heavens part and there in front of you is something new and exciting.
For example, I was building out my clone user flow for #salesforce1selfies and started thinking about how I had my search page set up. It was fairly standard with a text box where I would enter in a user ID but like Freddy Mercury, I want it all.
I wanted to be able to search on name,email and user ID and I wanted to do it from within one text box.
Really, it sounded pretty simple, but then again, you can sum up the lord of the rings trilogy by saying it was just about taking out the trash.
“All we have to do is throw the ring away, easy – peasy”.
Actually, it was easy…I mean, this was something I did while on my first cup of coffee. I started with my flow Mirepoix, input screen, query, output screen.
To that base, I added in a decision with three outcomes:
1) Input Text “Starts With” “005”
2) Input Text Contains “@”
3) Else assume text is name
These outcomes are each linked to a unique query and assignment:
1) Input Text “Starts With” “005” –> Query ID with Input Text –> varMatchType = “UserID”
2) Input Text Contains “@” –> Query Email with Input Text –> varMatchType = “Email”
3) Else assume text is name –> Query Name with Input Text –> varMatchType = “Name”
Fun and games aside, how does this work? Well, it works great! Here are some screen shots to prove it:
I would like to think it is because of my super ninja / bow / stealth / flow skills, but the reality is this is just a really good piece of functionality. I really like the potential here. Imagine creating one flow that does this type of analysis and routing…you could use it all over the place!
Hope you enjoyed this…questions or comments, let me know!