Re: String Qualifier for Number
Re: String Qualifier for Number
- Subject: Re: String Qualifier for Number
- From: Chuck Hill <email@hidden>
- Date: Fri, 14 Mar 2008 08:15:33 -0700
On Mar 14, 2008, at 6:26 AM, Carter Wojcik wrote:
Thanks Chuck.
That did the trick.
I did tinker with using a derived value before your
response, with the following:
definition = "to_char(part_id)";
externalType = NUMBER;
I think that was part of your problem, the database will be returning
a string.
name = partIdAsString;
valueClassName = NSString;
valueType = S;
Didn't have much luck getting it to work that way.
Only ran into one problem (tried using my own
substitution character) while implementing your
thoughts. I assumed since it was part_id, that you
were using %P, but after some research found in
EOAttribute that %P is the required substitution
character for the read-only formatting.
That part is a little obscure. P for Property maybe?
Thanks again for the help.
You are welcome.
Chuck
--- Chuck Hill <email@hidden> wrote:
On Mar 13, 2008, at 10:47 AM, Carter Wojcik wrote:
Hi All -
My users want to have the ability to search on a
Number attribute, but use String qualifiers such
as
Contains ('*value*'), Begins With ('value*'), Ends
With ('*value').
I have a table named part that contains a
primaryKey
named part_id (Number and exposed) and a String
called
descriptor.
Is there a way to create an EOQualifier that
replicates the SQL in the example below?
Example: Select all parts with a part_id that
begins
with 3.
select * from part where to_char(part_id) like
'3%';
Maybe...
Add a new attribute called partIDAsString
Set the column to part_id
Set the datatype as string
Mark it as read only
Set the read format to to_char(%P)
Then make a qualifier on partIDAsString.
Chuck
--
Practical WebObjects - for developers who want to
increase their
overall knowledge of WebObjects or who are trying to
solve specific
problems.
http://www.global-village.net/products/practical_webobjects
____________________________________________________________________________________
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now. http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ
--
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems.
http://www.global-village.net/products/practical_webobjects
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden