Help ON!! Datawindow Find

Situation:- A window has 1 SLE (user input) & 1 DW (display all customer
name).
Logic	 :- When user entered a character(1) into SLE, DW will point the 1st 

	    customer name start with that character(1), if entered 2nd character,
	    then DW will point the 1st customer name start with that
characters(2).
	    In other word, perform the same function like, PB help (Index) to
search
		
My Code is :-

li_len = len(sle_1.text)
sle1 = sle_1.text
li_found = dw_1.find("left(customer_name, li_len) = '"+ sle1 +"'", 1,
dw_1.rowcount())

System Error :- Expecting Number Expression

What is your advise? Thanks

0
CKS21
1/6/1999 2:31:59 PM
sybase.powerscript 7704 articles. 0 followers. Follow

3 Replies
399 Views

Similar Articles

[PageSpeed] 49

in your string used for the find, use sle1.TEXT , not sle1
CKS21 wrote in message <01be3980$d797cec0$d83abcca@ulc>...
>Situation:- A window has 1 SLE (user input) & 1 DW (display all customer
>name).
>Logic :- When user entered a character(1) into SLE, DW will point the 1st
>
>     customer name start with that character(1), if entered 2nd character,
>     then DW will point the 1st customer name start with that
>characters(2).
>     In other word, perform the same function like, PB help (Index) to
>search
>
>My Code is :-
>
>li_len = len(sle_1.text)
>sle1 = sle_1.text
>li_found = dw_1.find("left(customer_name, li_len) = '"+ sle1 +"'", 1,
>dw_1.rowcount())
>
>System Error :- Expecting Number Expression
>
>What is your advise? Thanks
>


0
Philip
1/6/1999 2:46:31 PM
"CKS21" <cks21@tm.net.my> wrote:
[This reply posted and e-mailed]

>li_len = len(sle_1.text)
>sle1 = sle_1.text
>li_found = dw_1.find("left(customer_name, li_len) = '"+ sle1 +"'", 1,
>dw_1.rowcount())
>
>System Error :- Expecting Number Expression
>
>What is your advise? Thanks

My advice is to go to my web page
(http://www.teleport.com/~wagnerc/powerbuilder.html) and download the
"DataWindow Incremental Search" and use it instead of building your own.

The problem with your code is in the expression:

"left(customer_name, li_len) = '"

The datawindow doesn't know anything about PowerScript variables. It is not
substituting li_len with a value. So the datawindow is seeing a string (li_len)
where it expects a number. You need to 'build' the statement by concatenating in
the value of the variable, not including the variable name.

"left(customer_name, " + String (li_len) + ") = '"
---
Craig Wagner                   | E-mail:  cwagner@metacorp.com
CPD Professional               | Web:     http://www.metacorp.com
Certified Powersoft Instructor | Phone:   (503) 452-6343
Portland, OR USA               |

Keeper of the PowerBuilder FAQ
http://www.teleport.com/~wagnerc/powerbuilder_faq.html
0
cwagner
1/6/1999 4:15:49 PM
Try this:
 li_len = len(sle_1.text)
 sle1 = sle_1.text
 li_found = dw_1.find("left(customer_name, " + STRING(li_len) + ") = '"+ sle1
+"'", 1,
 dw_1.rowcount())



In article <01be3980$d797cec0$d83abcca@ulc>,
  "CKS21" <cks21@tm.net.my> wrote:
> Situation:- A window has 1 SLE (user input) & 1 DW (display all customer
> name).
> Logic	 :- When user entered a character(1) into SLE, DW will point the 1st
>
> 	    customer name start with that character(1), if entered 2nd
character,
> 	    then DW will point the 1st customer name start with that
> characters(2).
> 	    In other word, perform the same function like, PB help (Index) to
> search
>
> My Code is :-
>
> li_len = len(sle_1.text)
> sle1 = sle_1.text
> li_found = dw_1.find("left(customer_name, li_len) = '"+ sle1 +"'", 1,
> dw_1.rowcount())
>
> System Error :- Expecting Number Expression
>
> What is your advise? Thanks
>
>


--
Phil Yandel
Application Developer Manager
American Medical Association

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    
0
Phil_Yandel
1/6/1999 5:25:54 PM
Reply:

Similar Artilces:

help on datawindow find!!
scripts :- A1. lv_key=sle_1.text A2. li_recno=dw_2.find("left("+'code'+",1)='"+lv_key+"'",1,dw_2.rowcount()) B1. li_len=len(sle_1.text) B2. lv_key=sle_1.text B3. li_recno=dw_2.find("left("+'code'+",li_len)='"+lv_key+"'",1,dw_2.rowcount()) Objective:- is to seacrh the contain of sle_1 (assume is a character for A situation) exist in dw_1 Plse refer to line A2 and B3, I replace integer 1 with variable li_len, it raised error "Expecting Number Expression". Plse help cks wrote...

Help, Help, Help
Hello, I'm new to PB and using a ver. 7. All I wanted to do for the moment is to set my DataWindow to some of my SQL select statement.... That is, if I click the "Connect" the SQL select statement "new_select" will be viewed into the DataWindow "dw_CACHE". I tried lots of experiment and still failed! Below is a short code that I was doing. Kindly advice.... Regards, John ********************************************************************** string new_select // Set the default Transaction object properties (TestBed) SQLCA.DBMS = &...

Help on datawindow find!!
script :- A1. lv_key=sle_1.text A2. li_recno=dw_2.find("left("+'code'+",1)='"+lv_key+"'",1,dw_2.rowcount()) B1. li_len=len(sle_1.text) B2. lv_key=sle_1.text B3. li_recno=dw_2.find("left("+'code'+",li_len)='"+lv_key+"'",1,dw_2.rowcount()) Objective:- is to seacrh the contain of sle_1 (assume is a character for A situation) exist in dw_1 Plse refer to line A2 and B3, I replace integer 1 with variable li_len, it raised error "Expecting Number Expression". Plse help ...

Help, Help, Help !!!
Hello, I'm new to PB and using a ver. 7. All I wanted to do for the moment is to set my DataWindow to some of my SQL select statement.... That is, if I click the "Connect" the SQL select statement "new_select" will be viewed into the DataWindow "dw_CACHE". I tried lots of experiment and still failed! Below is a short code that I was doing. Kindly advice.... Regards, John ********************************************************************** string new_select // Set the default Transaction object properties (TestBed) SQLCA.DBMS = &...

HELP!HELP!HELP!HELP!HELP!HELP!
I was using powerbuilder4.0 a month ago I decided that migrate it to PB7.0 When Im using 4.0, in datawindows I was using extra colums additional to stores procedure. I mean that for example; stored proc. returns 4 columns. I was using 2 extra columns to modify something from client. But I cant do the same thing in PB7.0. How can I do that??? please help. Gurcan yucel gyucel@infina.com.tr "I was using 2 extra columns to modify something from client." what does this mean that you added to the result set? If so then just goto the SQL and add a param. Then set the...

Help Help Help Help Help Help
------=_NextPart_000_0074_01C2960E.EBE13A30 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Can someone please help me. I have installed mysql on Unix Solaris and it works fine I have Perl installed previously which is working and with which i have installed other perlmodules before and are working fine. I have also installed DBI and it works fine with the Sybase drivers which i have installed. When i tried to install the Msql-Mysql-modules-1.2219 drivers i get the following error. # make /usr/local/bin/perl -Iblib/arch -Iblib/lib -I/...

Help Help Help Help
i need to create a crosstab report using Crystal reprot for VS 2003 i face aproblem when i need to order my Fileds by their names my data must be like this Basic Cola Housing Gross Deduction1 Deduction2 Deduction3 Net but when i run my report it give my a not sorted data acutally i have acode field which can i order field using it. but i don't knwo how to do thisSo..................? Select Report tab | |-->Select Record Sort expert Choost the fields you want to sort --Select the corresponding sort direction f...

help help help help
Name: chef mario Email: chefusa_at_pacbell.net Product: Firefox Summary: help help help help Comments: Heard great reports about Firefox!!! Downloaded & installed Firefox !!!! Lost All my very very valuable BOOKMARKS!!! CAN ANYONE HELP!!!!! All bookmarks were in Internet Explorer Did bookmark transfer to Firefox. Seem the Fox eat all m,y bookmarks Need serious help anyone. chef mario Browser Details: Mozilla/5.0 (Macintosh; U; PPC Mac OS X Mach-O; en-US; rv:1.8) Gecko/20051025 Firefox/1.5 ...

Help Help Help DataWindow.NET 2.0
Hello, i am using datawindow.NET 2.0 evaluation version my application is working fine using Pbls as source for objects as soon as i change the Pbl to PBD the application gives the error object not found however help says that u can use PBDs kindly tell me that this error is due to evaluation version or there is something wrong i am very worried about this behaviour because i have to report to my project manager for this behaviour of datawindow.NET kindly reply thanks Haroon Yes PBDs will work with the evaluation version. Is this a web forms or Windows Form...

How to find the presentation style of a datawindow in powerscript
Is there a way to find out the presentation style (like composite or crosstab or tabular ..) of a datawindow in powerscript ? Any information would be appreciated. Thanks! Shireesh email : shireesh.khandkar@lgeenergy.com //Dynamically determining the datawindow presentation style. string presentation_style string dw_type presentation_style = dw_1.Describe("datawindow.processing") CHOOSE CASE presentation_style CASE "0" dw_type = "Form, group, query,or tabular" //default setting CASE "1" dw_type = "Gr...

How to find the presentation style of a datawindow in powerscript
Is there a way to find out the presentation style (like composite or crosstab or tabular ..) of a datawindow in powerscript ? Any information would be appreciated. Thanks! Shireesh email : shireesh.khandkar@lgeenergy.com //Dynamically determining the datawindow presentation style. string presentation_style string dw_type presentation_style = dw_1.Describe("datawindow.processing") CHOOSE CASE presentation_style CASE "0" dw_type = "Form, group, query,or tabular" //default setting CASE "1" dw_type = "Gr...

How to find the presentation style of a datawindow in powerscript
Is there a way to find out the presentation style (like composite or crosstab or tabular ..) of a datawindow in powerscript ? Any information would be appreciated. Thanks! Shireesh email : shireesh.khandkar@lgeenergy.com //Dynamically determining the datawindow presentation style. string presentation_style string dw_type presentation_style = dw_1.Describe("datawindow.processing") CHOOSE CASE presentation_style CASE "0" dw_type = "Form, group, query,or tabular" //default setting CASE "1" dw_type = "Gr...

How to find the presentation style of a datawindow in powerscript
Is there a way to find out the presentation style (like composite or crosstab or tabular ..) of a datawindow in powerscript ? Any information would be appreciated. Thanks! Shireesh email : shireesh.khandkar@lgeenergy.com //Dynamically determining the datawindow presentation style. string presentation_style string dw_type presentation_style = dw_1.Describe("datawindow.processing") CHOOSE CASE presentation_style CASE "0" dw_type = "Form, group, query,or tabular" //default setting CASE "1" dw_type = "Gr...

HELP HELP HELP
I need EAS 3.0.1 mantainance as soon as possible or at least an updated datawindow.jar. I've already asked the mantainance CD to italian Sybase support but they know nothing about it. If someone from sybase could send me an updated datawindow.jar would be very very appreciated. Please email me to m.mazza@ads.it Thank you Mauro Mazza Research & Develop - Gruppo FINMATICA E-mail: m.mazza@ads.it http://www.ads.it ADS automated data systems - Data Processing S.p.A. Via Del Lavoro, 17 40127 Bologna - Italy tel. +39 051 6307 411 fax. +39 051 6307 498 We expect t...

Web resources about - Help ON!! Datawindow Find - sybase.powerscript

PowerBuilder - Wikipedia, the free encyclopedia
PowerBuilder is an integrated development environment owned by Sybase , a division of SAP . It has been in use since 1991, peaking around 1998 ...

Intelligent Versus Surrogate Keys
Should I use business columns as primary key fields for tables in thedatabase, or generate artificial primary key values? When business-related ...

chevy volt
ProEXR File Description =Attributes= channels (chlist) compression (compression): Zip dataWindow (box2i): [0, 0, 5119, 2475] displayWindow (box2i): ...

Enable - A comprehensive solution for the localization of PowerBuilder applications Untitled Document ...
Enable is localization/ translation tool used by PowerBuilder developers to make their applications multilingual.Enable is a powerful tool that ...

comp.lang.clipper.visual-objects - Google Groups
comp.lang.clipper.visual-objects 1-20 von 33006 Themen werden angezeigt Integrity of a file marcosm...@gmail.com 09:35 Combobox value Lu 08:12 ...

Sybase PowerBuilder tool readied for Microsoft's .Net
Developers can choose Win32 or newer style .Net development

PowerToTheBuilder - PowerBuilder UI Controls
HOME - COMPONENTS - PB UI DESIGNER - DOWNLOAD\PURCHASE - SUPPORT - FAQ - ABOUT Take Control of your UI with PB Ultimate Suite PowerToTheBuilder.com ...

Beautiful iPad Mini 3 Concept Reimagines Appleā€™s Tablet With iPhone 6 Design, Gold Color [Images]
The iPhone 6 may be grabbing all of the recent headlines due to its impending announcement, but spare a thought for those who prefer to stay ...

Java Networking - Real's HowTo
Real's HowTo Custom Search Java Language String and Number Applet AWT Swing Environment IO Javascript interaction JDBC Thread Networking JSP ...

Business Intelligence Products - Database Management, Data Warehousing & Mobility Software - Sybase Inc ...
Sybase offers a variety of Business Intelligence (BI) software like products for database management, data warehousing and mining, data integration ...

Resources last updated: 1/12/2016 12:32:51 AM