Debdas Banerjee
9th February 2004, 10:33
Dear Friends
I need some help from BaaN friends. I have done a maintain session and that has two fields and one main table . Table name is tdcus840. fields are " SLNO " which is view field in form and other one is " SLID "multioccarance field.
What I want is, first I will input SLNO field and then SLID . for the first time it is ok but when i enter second value in SLID in under same SLNO , previous value is carrying forword . I want to remove it . I need blank for the field. No value should be there.
How i will remove it in next field.
one more thing with out pressing TAB key how i will come to next field.
I am waiting for help
Regards
NPRao
9th February 2004, 11:27
Deb,
with out pressing TAB key how i will come to next field.
You can use the tools function - to.field() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_form_and_form_field_operations_to_field)
previous value is carrying forword . I want to remove it . I need blank for the field. No value should be there.
That is the BaaN Standard tools behaviour. If you like to change it you have to do some coding to set default values, like -
field.field1:
before.input:
if update.status = add.set then
field1 = 100
endif
Debdas Banerjee
9th February 2004, 13:17
Hi
N. Prashanth Rao
Thanks for quick reply .
First problem i have solved through form only . In form I have set default value = " " . So when it comes into next field then it comes as a blank record .
Now question is how I pass TAB key value with out pressing TAB key. I have checked to.fiekd() , but it use after.field , after.display .
It is not solve the problem.
From Visual basic there is a systex like
sendkeys("{TAB}"},true
But I hope there is option for going next field without pressing TAB key, When it reach the last char of that field.
Regards
NPRao
9th February 2004, 20:05
Deb,
But I hope there is option for going next field without pressing TAB key, When it reach the last char of that field.
IF you had a field of 10 characters and the users can enter 0-10 characters how would you know the last character of that field unless you specify that the field always needs 10 characters or press TAB key to notify to move to the next field.
You can look up the tools help manual for more info into -
Events overview (http://www.baanboard.com/programmers_manual_baanerp_help_events_overview?CGISESSID=d44ec21f72eaf7b6cc751837f39e9ef1)
keyin$() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_char_b_win_keyin?CGISESSID=d44ec21f72eaf7b6cc751837f39e9ef1)
data.input() (http://www.baanboard.com/programmers_manual_baanerp_help_functions_char_b_win_data_input)
Debdas Banerjee
10th February 2004, 07:17
Hi
N. Prashanth Rao
Thanks again for helping . I have done some work around. Yesterday I was unable to pass TAB key value though script so what I did I add a chr(9) with barcode only. So when it scan the record it pass automatically TAB key value . And I have achive what I actually want . Yesterday i have tried to do with Keyin$() and data.input. Bit I did sucessied.
Regards
Debdas Banerjee
15th October 2004, 07:34
Hi friends,
Last time i scan the barcode after passing the value of chr(9) in barcode .
At that time we ware using the " Bartender " for lable printing now we are useing Visual Basic for barcode lable printing.
what i want is, without pressing the "TAB " key I want to pass the value of TabKey. It means I will not press Tab key , but it should come to next field
Any help through visual basic or through BaaN
With Best Regards
lbencic
15th October 2004, 16:46
How are you reading the bar codes - what bar code reader? Many readers have the ability to automatically append the tab or enter after the bar code scan - check the manual for your bar code reader.
You can't put the chr(9) using your VB Program? That's a good method for this.
Debdas Banerjee
16th October 2004, 06:57
hi,
Thanks for reply , we are using " PSC Q56000 PLUs " scanner.
I have tried Chr(9), vbTab , vbKeyTab in Visual program but it did not work.
Now I am trying to do through BaaN maintain session which I have developed . Here I have tried data.input, inkey(),to.field , nothing is working.
But You have given a good suggestion to change the scanner setting.
With Regards
mark_h
18th October 2004, 02:08
Are you scanners set-up to scan the tab? I know on our PSC scanners we had to make a few configuration changes to make sure it scanned control codes. I know one we changed was to make sure it did barcode 3 of 9 extended. I have also found that just because one out of the box works does not mean the next one will. Just a thought.
Mark
Hitesh Shah
18th October 2004, 07:31
Try this code as last statement in before.input section.
|Function to generate a TAB Event in the Session
function tab()
{
long event_2(EVTMAXSIZE)
evt.type(event_2) = EVTCHANGEFOCUS
evt.client.sender(event_2) = pid
evt.client.command(event_2) = 1
evt.focus.key(event_2) = KEY_TAB
if not send.event(get.pgrp(pid),event_2) then
message("Press Tab")
endif
}
Debdas Banerjee
18th October 2004, 10:18
Hi Hitesh
Thanks for replying, but it is not working in before.input bcz I have only two fields . one fiew field and one is multioccarance field. I want to pass the TAB key in multioccarance field .
I am attaching my code and form . Please guide me.
With Best Regards
Hitesh Shah
18th October 2004, 16:26
I saw ur code . U have put the tab() in the after input section. The program comes to after input section only when successful error free value is entered in the field and tab is keyed in. In ur case need the system to generate tab. So u must write the tab() in the before input.section. This code can help when u have value calculated / computed in the before input section.
However almost all bar code reader have options to generate tab keys (auto accept options ) . If u check the bar code reader manual , you may find such options.
Debdas Banerjee
23rd October 2004, 13:08
Hi Hitesh
Thanks for advice , I have changed the dcanner setting accouding to you advice and now it is working fine.
Thanks again
With Best Regards
Debdas Banerjee