CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> General/Other

 Comparisons in Search forms (newbie question)

Print topic Send  topic

Author Message
markB

Posts: 3
Posted: 11/14/2007, 2:36 PM

I'm new to CodeCharge Studio. I downloaded the demo version and I'm learning CCS and trying to figure out if it's the best choice for me.

I already made some test applications and discovered many great features I really like. Nevertheless I'm stuck on something.

I can't find (maybe I missed it) how to include comparisons in a search form, to allow the user to, for example, find the records where <such field> is higher than a value he specifies, or is lesser than or equal to a value he specifies, etc. Basically the user can pick up a comparison sign/expression.

This is a feature available in several other programs so I assume CCS offers it too.

Examples:


Where is the option to set that?
View profile  Send private message
wkempees


Posts: 1679
Posted: 11/15/2007, 3:45 AM

CCS will generate advanced applications from the defenitions you supply.
Search functionality has a few options in the builders (wizzard) such as single entry field combined searches.
However the search you require is not a standard builder option.
the way to go about this is after generating the most extensive basic search/result grid and enhance that, by chaging/expanding the search form and the grids datasource.

Any RAD tool wil reach a certain percentage of completeness, it is the tools offered to expand on generated code that define usability of the tool.
CCS offers builders to build 80pct in 20pct of the time but also has enough tooling to help you complete the rest 20pct fast.
Requirments are basic or good Sql and programming language knowledge (as well as a good search engine)

Walter
_________________
Origin: NL, T:GMT+1 (Forumtime +9)
CCS3/4.01.006 PhP, MySQL .Net/InMotion(Vista/XP, XAMPP)

if you liked this info PAYPAL me: http://donate.consultair.eu
View profile  Send private message
markB

Posts: 3
Posted: 11/16/2007, 6:34 PM

Thank you for your kind reply.

I'm really puzzled. Yes, I know that there is no "perfect" RAD. But how can such a great software like CCS lack such a basic feature... I'd buy it immediately if there was not this issue.

I've done a lot of investigation and so far I've found nothing about how to give the end-user the possibility to perform such basic things like searching for records where a field is superior/inferior to than a value set by the user, like records with a price higher than X, , or a person younger than Y, or a distance greater than Z, or where the recorded year is before year X (inferior to X), etc.

No examples/demos of CSS offers such a feature I guess, and no sites posted by CCS users seem to offer it either, at least as far as I could see.

It seems it's related to the very structure of CCS (but I may be wrong) where the search form just sends values and the data is in fact filtered by the grid:

"The search form submits the input parameters and the grid form receives them and uses them to filter the records that are retrieved and displayed on the grid."
CCS Help files

"The search fields only accept search keywords from users. They do not do any searching. The data is then filtered by the grid.
You can enter any SQL that you want in your grid's data source..."

Peter R.
YesSoftware Forums Moderator
in http://forums.codecharge.com/posts.php?post_id=63951

Now, maybe I'm totally wrong and I miss something. So here is my concern:

My problem is I make "technical" applications where being able to search for "more/less than" is important and often used, and those applications are often modified or are not used for a long time. So performing complex editing (assuming it's possible) for such common searches almost negates the advantages of CCS or of any other RAD in the same case.

So, if I may ask:

- Could someone direct me to some existing solutions or give me some clues to start with, assuming what I want to do is reasonably possible

- does by chance the upcoming CCS 4 offer the feature I'm looking for, or something that could help? (In which case I'd buy CCS 3 and download the beta 4 to figure out what I can do)

Note: I use PHP/Apache/Linux

Thanks in advance for any help. :)
View profile  Send private message
cazzani

Posts: 11
Posted: 11/21/2007, 2:56 PM

Mark, unfortunately I don't have a solution but I think you raised a good point.
I think the only way to mange this in CCS 3.x in through some little custom code.

The feature you mentioned would be a nice add to a future release of CCS (that is IMHO a very useful product nevertheless). I hope Yes Software will soon implement it.

Stefano
View profile  Send private message
datadoit
Posted: 11/21/2007, 5:52 PM

Put some custom code in your grid's Before Build Select event:

if ($Container->DataSource->Where <> "") {
$Container->DataSource->Where .= " AND ";
}

switch ($Container->ComparisonListbox->GetValue()) {
case "is greater than":
$Container->DataSource->Where .= "Field1 > Field2";
break;
case "is less than":
$Container->DataSource->Where .= "Field1 < Field2";
break;
case "equal to":
$Container->DataSource->Where .= "Field1 = Field2";
break;
}

You kinda get the idea. You have full dynamic control over the building
of the SQL that will do the query.

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

MS Access to Web

Convert MS Access to Web.
Join thousands of Web developers who build Web applications with minimal coding.

CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.