S
sri
Guest
when i search in the name fill-in with a starting letter of a name it should display all the name starting with that letter.
TIP: it should use open query` DO:
IF (input customer.cust-num <> 0) and (input customer.name = "") then do: find first customer where ( customer.cust-num = input cust-num) no-error . OPEN QUERY custqry FOR EACH customer.
display customer.cust-num customer.name customer.balance customer.discount customer.credit-limit customer.phone customer.contact with browse br1 . /*to display in browser*/
assign
ocustnum = customer.cust-num
oName = customer.Name
obalance = customer.balance
odiscount = customer.discount
ocredit-limit = customer.credit-limit
ophone = customer.phone
ocontact = customer.contact .
display ocustnum oName obalance odiscount ocredit-limit ophone ocontact with frame default-frame . /*to display in fillin*/
end.
ELSE IF (input customer.cust-num = 0) and (input customer.name <> "") then do:
find first customer where customer.name begins input name no-error . OPEN QUERY q FOR EACH customer BY name.
display customer.cust-num customer.name customer.balance customer.discount customer.credit-limit customer.phone customer.contact with browse br1. /*to display in browser*/
assign
ocustnum = customer.cust-num
oName = customer.Name
obalance = customer.balance
odiscount = customer.discount
ocredit-limit = customer.credit-limit
ophone = customer.phone
ocontact = customer.contact .
display ocustnum oName obalance odiscount ocredit-limit ophone ocontact with frame default-frame . /*to display in fillin*/
end.
ELSE
IF (input customer.cust-num <> 0) and (input customer.name <> "") then do:
find first customer where ( customer.cust-num = input cust-num) and (customer.name begins input name) no-lock no-error . OPEN QUERY cust-query FOR EACH customer BY name.
display customer.cust-num customer.name customer.balance customer.discount customer.credit-limit customer.phone customer.contact with browse br1. /*to display in browser*/
assign
ocustnum = customer.cust-num
oName = customer.Name
obalance = customer.balance
odiscount = customer.discount
ocredit-limit = customer.credit-limit
ophone = customer.phone
ocontact = customer.contact .
display ocustnum oName obalance odiscount ocredit-limit ophone ocontact with frame default-frame . /*to display in fillin*/
end.
END.
` the above code i have written for the search button.enter image description here
Continue reading...
TIP: it should use open query` DO:
IF (input customer.cust-num <> 0) and (input customer.name = "") then do: find first customer where ( customer.cust-num = input cust-num) no-error . OPEN QUERY custqry FOR EACH customer.
display customer.cust-num customer.name customer.balance customer.discount customer.credit-limit customer.phone customer.contact with browse br1 . /*to display in browser*/
assign
ocustnum = customer.cust-num
oName = customer.Name
obalance = customer.balance
odiscount = customer.discount
ocredit-limit = customer.credit-limit
ophone = customer.phone
ocontact = customer.contact .
display ocustnum oName obalance odiscount ocredit-limit ophone ocontact with frame default-frame . /*to display in fillin*/
end.
ELSE IF (input customer.cust-num = 0) and (input customer.name <> "") then do:
find first customer where customer.name begins input name no-error . OPEN QUERY q FOR EACH customer BY name.
display customer.cust-num customer.name customer.balance customer.discount customer.credit-limit customer.phone customer.contact with browse br1. /*to display in browser*/
assign
ocustnum = customer.cust-num
oName = customer.Name
obalance = customer.balance
odiscount = customer.discount
ocredit-limit = customer.credit-limit
ophone = customer.phone
ocontact = customer.contact .
display ocustnum oName obalance odiscount ocredit-limit ophone ocontact with frame default-frame . /*to display in fillin*/
end.
ELSE
IF (input customer.cust-num <> 0) and (input customer.name <> "") then do:
find first customer where ( customer.cust-num = input cust-num) and (customer.name begins input name) no-lock no-error . OPEN QUERY cust-query FOR EACH customer BY name.
display customer.cust-num customer.name customer.balance customer.discount customer.credit-limit customer.phone customer.contact with browse br1. /*to display in browser*/
assign
ocustnum = customer.cust-num
oName = customer.Name
obalance = customer.balance
odiscount = customer.discount
ocredit-limit = customer.credit-limit
ophone = customer.phone
ocontact = customer.contact .
display ocustnum oName obalance odiscount ocredit-limit ophone ocontact with frame default-frame . /*to display in fillin*/
end.
END.
` the above code i have written for the search button.enter image description here
Continue reading...