How to serach in mutildemension array alone with ASCAN() ?

Topic Specific Tutorials and Tips.

Moderator: Rathinagiri

Post Reply
huangchenmin
Posts: 157
Joined: Mon Jun 07, 2010 2:24 am

How to serach in mutildemension array alone with ASCAN() ?

Post by huangchenmin »

:lol: Hi everyone: :lol: :D
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 ? :oops: :cry:
By the way , why Type(form_upload.PFID_Keyin.Value) returns N even 『DATATYPE CHARACTER』 was seted up ? :cry: :roll: :?:
Best Regards
chen min
huangchenmin
Posts: 157
Joined: Mon Jun 07, 2010 2:24 am

Re: How to serach in mutildemension array alone with ASCAN()

Post by huangchenmin »

huangchenmin wrote::lol: Hi everyone: :lol: :D
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 ? :oops: :cry:
By the way , why Type(form_upload.PFID_Keyin.Value) returns N even 『DATATYPE CHARACTER』 was seted up ? :cry: :roll: :?:
Best Regards
chen min
I found the answer!
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!
Post Reply