0
名前の記入欄に名前の先頭文字を検索すると、その文字で始まるすべての名前が表示されます。ブラウザで昇順または降順に名前を検索して表示する方法
TIP:それは
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.
` 私は検索ボタンのために書かれている上記のコードをオープンquery`を使用する必要があります。 enter image description here
あなたはそれが打ち込まれているのコードで始まる名前だけを表示したい場合は、あなたがしたい場合がありますそれをブラウズクエリに変更します。だから私はあなたが前に顧客を見つけていると思っていましたが、あなたがそれに取り組んでいないのであれば、なぜそれをするのに時間を取るのかは分かりません。 AppBuilderの場合、customer.nameが入力cust-numを開始する各顧客に対して、 OPEN QUERY {&browse-name}を試してみるとよいでしょう。 – bupereira