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
Answered

任意の形式で連番を自動生成したい

(1) ShareShare
ReportReport
Posted on by 8
はじめまして、powerappsでアプリを試行錯誤して作成しています。
メインの画面上部に、新規追加ボタンがあり「NewForm関数」で編集画面が新規で画面遷移します。
メインの画面中央には「部品管理リスト」を読み込んだギャラリーがあり編集ボタンを押すと「EditForm関数」で編集画面が対象のリストのデータを編集できる状態で画面遷移します。
わからない事が2つあって質問します。
1つ目は、部品管理リストの列に「管理番号」「管理場所」・・・があります。「管理番号」は例として「2025-0021」と表示します。
「管理番号」の形式は、年度(2025年度であれば、2025/4/1~2026/3/31までを2025) "-" 4桁の連番で表示します。
データを保存する「SubmitForm関数」の直前に自動で「管理番号の最大値+1」を取得して登録するにはどうしたらいいでしょうか。※年度初め(最初の登録)は最大値がない状態からの登録
2つ目は、管理番号が登録してある「管理番号リスト」があります。部品管理リストと同じく列に「管理番号」と、「管理場所」があります。
「管理番号リスト」にはあらかじめ「管理番号」「管理場所」は登録してあります。
1つ目で自動取得した「管理番号」と「管理番号リスト」の「管理番号」で一致する「管理場所」も同時に登録するにはどうしたらいいでしょうか。
 
ご教授くださいますよう、よろしくお願いいたします。
 
 
I have the same question (0)
  • Verified answer
    Michael E. Gernaey Profile Picture
    53,369 Super User 2025 Season 2 on at
     
     
    please use pictures not just words to describe so we can see what you see and mark up the pictures.
     
    Share your Data schema, so we follow better, please make sure to visualize it so we can know whats in your head exactly.
     
    However, what you are asking for while, technically doable, is going to cause you issues in the long run if multiple people are submitting at the same time, they will very possibly get the same "max" value that you want, and then you will unintentionally duplicate the new value. 
     
    would need to discuss in much more depth.
     
    Again please share more details on the Schema of the Data and mark up pictures
     
  • CU04041301-0 Profile Picture
    8 on at
    マイケル・E・ジェルネイ 様
     
    ご回答ありがとうございます。
    現状の画面とやりたいことの絵を送付します。
     
    追加で必要な情報があればご連絡ください。
     
    よろしくお願いします。
    Dear Michael E. Gernay
     
    Thank you for your reply.
    I will send you a picture of the current screen and what I want to do.
     
    Please contact me if you need any additional information.
     
    Thank you in advance.
  • CU04041301-0 Profile Picture
    8 on at
    マイケル・エ・ジェルネイ様
     
    2つ目の質問は自己解決しました。
     
    >>1つ目で自動取得した「管理番号」と「管理番号リスト」の「管理番号」で一致する「管理場所」も同時に登録してどうしたらいいでしょうか。
     
    ギャラリーの「管理場所」にLookUP関数を使用することで「管理番号リスト」の「管理番号」を読み取ることができました。
    残る1つ目の連番を取得する方法が未だわかりません。
     
    どうぞよろしくお願いします。

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard