web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / バーコードリーダーの利用について
Power Apps
Unanswered

バーコードリーダーの利用について

(0) ShareShare
ReportReport
Posted on by

PowerApps を使用してバーコードの読み取りを行おうとしています。
何枚もあるバーコードから、同じコードのものが何枚あり、違う場バーコードが混ざっていないかの検品の為です。
しかし、20件ほど読むと、アプリが落ちてしまいます。
あまりこういった作業には使用しないほうが良いのでしょうか?
 

伝票読取ボタンのコード:
ClearCollect(scantext,BarcodeReader1_2.Barcodes);
Set(scanresult,First(scantext).Value);
ClearCollect(BarcodeCollection, Filter(伝票, PKEY = scanresult));
ダンボール読取ボタンのコード:
Set(boxresult, First(BarcodeReader1_3.Barcodes).Value);
If(
    boxresult = GalleryA_1.Selected.バーコードNo1_1.Text,
   
    // 一致した場合:既存レコードの有無を確認して更新または追加
    With(
        {
            currentCode: boxresult,
            existingRecord: LookUp(BarcodeCountCollection, 商品名 = boxresult)
        },
        If(
            !IsBlank(existingRecord),
            Patch(
                BarcodeCountCollection,
                existingRecord,
                {
                    Count: existingRecord.Count + 1
                }
            ),
            Collect(
                BarcodeCountCollection,
                {
                    商品名: currentCode,
                    Count: 1
                }
            )
        )
    ),
 
    // 一致しない場合:最大Count + Unmatched行数 + 1 を使って新規追加
    With(
        {
            unmatchedCode: boxresult,
            maxCount: Max(BarcodeCountCollection, Count),
            unmatchedCount: CountRows(UnmatchedBarcodeCollection)
        },
        Collect(
            UnmatchedBarcodeCollection,
            {
                商品名: unmatchedCode,
                Count: maxCount + unmatchedCount + 1
            }
        );
        Set(AudioURL, "");
        Set(AudioURL, Codedifference)
    )
);
上記のコードを実行しバーコードの情報から検品を行おうとしています。
手順としては、
1.伝票読取ボタンを押し、伝票のバーコードを読む
2.読み取った情報から送り先名、品名、数量が表示される。
3.ダンボール読取ボタンを押し、ダンボールについてあるバーコードを読む。
4.品名と一致していれば下段上側のテキストボックスに表示し、2個目以降の場合は読み取り数のカウントを1つ増やす。
一致していなければ下段下側のテキストボックスに表示し、何回目に呼んだものかを表示する。
3.の時にアプリが落ちることがあります。
ScanningQuality:"Low"
ScanningMode:"Select to scan"
使用端末
iPadOS 18.5
機種名 iPad(第8世代)
となっております。
Categories:
スクリーンショット 2025-09...

Your file is currently under scan for potential threats. Please wait while we review it for any viruses or malicious content.

I have the same question (3)
  • Michael E. Gernaey Profile Picture
    53,479 Super User 2025 Season 2 on at
     
    There is no way to answer you question. Without seeing the app details, how it works etc its not possible tell you.
     
    I scan hundreds of items, sometimes a thousand or so in a row in my inventory app with no issue, so, you have to share more clarity in what the App does, how it stores data, then walk us through the App steps, with pictures, and explain what you mean by it fails/errors.
     

    If these suggestions help resolve your issue, Please consider Marking the answer as such and also maybe a like.

    Thank you!
    Sincerely, Michael Gernaey 

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard