画面フローで [前へ] ボタンを使用して戻ると、変数に割り当てた値が失われる事象を説明します。UI に値が残っている場合やデータベース操作後でも変数が NULL になることがあり、決定要素の判定に影響する可能性があります。本記事では、ループ構成や [レコードを取得] 要素の活用など、この動作に対する回避策を紹介します 。
画面 1 にいくつかの入力フィールドを持つ画面フローを作成します。画面 1 の入力に基づいて変数に値を割り当てます。データ型は任意です。
次に、次の画面 2 に移動し、「前へ」ボタンをクリックして最初の画面に戻ります。入力画面で割り当てられた変数の値が失われることに注意してください。
ただし、入力画面にはこれらの値が保持されている可能性があります。
別のシナリオでは、入力画面 1 の値を変数に保存し、データベース操作を実行してレコードを挿入/更新し、レコード値で画面 2 を表示します。
次に、「前へ」ボタンをクリックして前のフロー画面に移動します。データベース操作が完了し、レコードが挿入/更新されたにもかかわらず、画面 1 から値が割り当てられていた変数が NULL になることに注意してください。
これを決定要素で使用して、最初のステップのレコードが既に作成/更新されているかどうかをチェックし、さらに先に進む場合、問題が発生する可能性があります。
この画面フローの挙動は想定通りの動作です 。変数の値が失われる状況を回避するには、以下のいずれかの回避策を検討してください 。
前の画面へのナビゲーションを無効化し、特定の条件に基づいて最初の画面へループバックする一方向のフローを作成する。この構成により、変数の値を保持できる 。
データベース操作の重複を避けるため、フローの最終ステップまで変数の値を保持する 。
[レコードを取得] 要素を使用し、[決定] 要素の前に既存のレコードや値を同じ変数に再割り当てする。これにより、フローを再び進行させる際の重複操作を回避できる 。
000380596

We use three kinds of cookies on our websites: required, functional, and advertising. You can choose whether functional and advertising cookies apply. Click on the different cookie categories to find out more about each category and to change the default settings.
Privacy Statement
Required cookies are necessary for basic website functionality. Some examples include: session cookies needed to transmit the website, authentication cookies, and security cookies.
Functional cookies enhance functions, performance, and services on the website. Some examples include: cookies used to analyze site traffic, cookies used for market research, and cookies used to display advertising that is not directed to a particular individual.
Advertising cookies track activity across websites in order to understand a viewer’s interests, and direct them specific marketing. Some examples include: cookies used for remarketing, or interest-based advertising.