Jump to content

Recommended Posts

  • 7 years later...
On 11/10/2016 at 9:18 PM, Joe Tauser said:

Data tables are not really a database, but you can search for a value in a column.  Look in the Help on "Data Table Find"

Joe T.

Dear Joe,

Can I get a Sample coding for Data Table find  in Visi Logic.

My requirement is  as follows.

I get Invoice number from Scanner.

I should search for this number either  Exists in Data Table or Not.

If record does not exists in Data table  then I should proceed further operation

The DataTable  is as attached

The Invoice number Stored in Column 2 ,and it is unique

Please send me Sample Vlp File to My email ID/Whatsup

"anravindranatha@yahoo.com",My whatsup no is +91-9945323817

else i should reject the operaimage.png.f15e3dc5edf37e8fc4f28e9479b2a27a.pngtion

Link to comment
Share on other sites

  • MVP 2023
On 11/10/2016 at 9:48 AM, Joe Tauser said:

Look in the Help on "Data Table Find"

 

4 hours ago, Ravi said:

Can I get a Sample coding for Data Table find  in Visi Logic.

Did you review the Help entry as Joe suggested? It is very clear and performing the action you need is very simple.

Please keep in mind that this is a user forum staffed by volunteers with actual full time jobs. This is not official Unitronics Support.

Link to comment
Share on other sites

  • MVP 2023

@Ravi - I generally don't write programs from scratch for people on the forum.  My philosophy has always been you learn by doing.

That said, I will generally help a user who's made an honest stab at making a program work by editing it for them.  If you upload the program you're working on I and others on the forum will be happy to download it and have a look at your work.

Make sure you tell us which version of Visilogic you're using.

Joe T.

  • Like 1
Link to comment
Share on other sites

5 hours ago, Joe Tauser said:

@Ravi - I generally don't write programs from scratch for people on the forum.  My philosophy has always been you learn by doing.

That said, I will generally help a user who's made an honest stab at making a program work by editing it for them.  If you upload the program you're working on I and others on the forum will be happy to download it and have a look at your work.

Make sure you tell us which version of Visilogic you're using.

Joe T.

Dear Joe

Here is the code Written for above

Logic written  to Find row containing Invoice Number which Already exists in DataTable or not

Ex If ML10 = contains Invoice No=40625

ML9 and ML8 Should retrun the no How many times it occured in Data Table that is

0 for No Row contains 40625 ,1 For 1 Row Contains

but i am Getting Some other number may be 3 or 4 

and some times 

0  if it exists

request your help to diagnose the cause

 

image.png.963750c1e6dde8a6cfb3bd0696463f9c.png

image.png.913fd72464cf5e59a73ad0b8ea311da8.png

image.png.b04a23f971456f8ef6198aa92f19ce75.png

 

test with herculs_R1.vlpimage.png.96a656f78c7e94da2e229480d13ea790.png

Link to comment
Share on other sites

Some considerations:

1. You are skipping row 0. First Data tables row is 0. In your case, limits must be 0 ... 299.

2. ML9 returns the FIRST row where the InvoiceNO is found, or returns -1 if not found; not the number of times InvoideNO is present in the DB.

3. You don´t need to use find extended FB.

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...