Hi everyone:
There are an 4x3 array, in which 4 rows and 3 columns. Columns represent NAME,CUSTOM_ID,TEL.
How to serach corresponding cell match in array alone with ASCAN(). Following are my code.
TEXTBOX named PFID_Keyin got a value from user.
ASCAN(a_curlist,form_upload.PFID_Keyin.Value)
ASCAN() returns 0 all the time. What is going wrong ?
By the way , why Type(form_upload.PFID_Keyin.Value) returns N even 『DATATYPE CHARACTER』 was seted up ?
Best Regards
chen min
How to serach in mutildemension array alone with ASCAN() ?
Moderator: Rathinagiri
-
- Posts: 157
- Joined: Mon Jun 07, 2010 2:24 am
-
- Posts: 157
- Joined: Mon Jun 07, 2010 2:24 am
Re: How to serach in mutildemension array alone with ASCAN()
I found the answer!huangchenmin wrote: Hi everyone:
There are an 4x3 array, in which 4 rows and 3 columns. Columns represent NAME,CUSTOM_ID,TEL.
How to serach corresponding cell match in array alone with ASCAN(). Following are my code.
TEXTBOX named PFID_Keyin got a value from user.
ASCAN(a_curlist,form_upload.PFID_Keyin.Value)
ASCAN() returns 0 all the time. What is going wrong ?
By the way , why Type(form_upload.PFID_Keyin.Value) returns N even 『DATATYPE CHARACTER』 was seted up ?
Best Regards
chen min
The code should be like following.
ASCAN(a_curlist,{|a_arg|a_arg[m_arg01]==m_key4seek})
HMG will performing code block with every element of array, and the code block returns .T. when element matchs the m_key4seek. Meanwhile ASCAN returns row when code block returns .T.. m_arg01 represents the column of array.
That 's all!