Is Search Param - Please use

Is Search Param - Please use

  
Hi fellows!

I'm writing here not for a question, but to share a tip specially to those that are starting in OutSystems...
When creating a search page with (multiple or not) search fields, use Is Search Param flag.
(http://www.outsystems.com/help/servicestudio/5.0/Using_Data/Simple_Query_Parameter_Properties.htm)

This will help you a lot to develop faster and, even more, you and others to maintain your project!

I had the complain of a search page that wasn't working properly.. so after looking at the structure, I decided to re-program all. Just because for each param, there was an IF condition, so basically 12 queries, exacly the same, just changing the params. Just have a look in the attachment.
(true leg of NEW condition is mine, using Is Search Param flag; false leg is the legacy! - I didn't want to delete all before everything was tested)

Keep in mind that when you build a project you must always think on maintenance. This is really really important, since there's no project in our world that will be done only once, published and never ever changed!

Please think on others. :D

Good luck!
Great example - and good warning for everyone who's not familiar with the "Is Search Param" functionality.

...we should create some sort of competition that would rate the most "artistic" code layout in an eSpace - trust me, I've seen a few ;) Something like the International Obfuscated C Code Contest but for OS :)

Cheers,

Paulo Tavares
Hi Carolina,

Concerning your screenshot; you might want to check out the "Switch" possibility (not sure whether it exists in your Service Studio version though).
That can keep your coding pretty 'clean' and will eliminate a load of "IF" statements.

Cheers!
Nooooo please... those lots of IF are not mine!
I will delete all!
Mine is just the small part on the left... under the NEW if.
:D
I just left the "old part" to show what was and what will be.
hahaha
Hi Paulo!
Yes, sure would be really fun to have a competition hahaha
And, since everything has a good side,  we could learn a lot too.
:D

Hahaha, that would be very nice indeed ..
I have seen some wonderfull (and terrible) flows too ..

regards,
Wim
Hi Carolina,

It's good to hear that you didn't create all of the if statements. :)
Hi!!! hahaha

It's ok... I understand that probably you didn't read all what I wrote and only looked at the attachment.
:D

(true leg of NEW condition is mine, using Is Search Param flag; false leg is the legacy! - I didn't want to delete all before everything was tested)
Ah; after reading it (twice) I understand what you mean by "Leg".
I'm sorry; this is my bad; I had no idea what that referred to so I actually kind of ignored the sentence.

Looks like a good 'cleanup' to my if you replaced the right "Leg" with the left part.

I mean; replacing 12 queries with only one is quite the "normalisation".
Seeing this; you might like a post I made which also has some 'normalisation' in it:
http://www.outsystems.com/NetworkForums/ViewTopic.aspx?Topic=Tablerecords-List-Filter-made-Easy-using-a-single-Simple-Query

Keep on sharing these examples; the more normalisation; the better.