Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Table variable values clear when navigating between screens in edit mode

(0) ShareShare
ReportReport
Posted on by

We’ve built wizard-style form which has multiple screens with Next and Back buttons. We are storing a Table Variable for one of the screens that is populated with values when checkboxes in a gallery are ticked. We use the OnCheck property to populate the variable.

Checkbox code for OnCheck property:

Set(Ljm, ShowColumns(Filter(GalleryLjms.AllItems, DataCardCheckboxLjms.Value),Value));

 

Then when the user navigated back to the screen using the wizard, we populate the set checkbox control based the table variable using the OnVisible property:

OnVisible property of the screen

If(FormMode.New Or FormMode.Edit,

    If(

        !IsBlank(DataCardValueLjms.SelectedItems),

        Set(Ljm, DataCardValueLjms.SelectedItems)

    );

)

 

The problem is that a few days ago, we noticed that the table variables are being cleared whenever we navigated back to the screen and try to reload the controls. Nothing changed in the form solution. It appears to be somehow related to the FormMode.New and FormMode.Edit functions but we don’t know what has changed. Has anyone else encountered as similar issue?

  • anandm08 Profile Picture
    1,936 Super User 2025 Season 1 on at
    Re: Table variable values clear when navigating between screens in edit mode
    If(formName.Mode=1 || formName.Mode=0,
    
     If(
    
     !IsBlank(DataCardValueLjms.SelectedItems),
    
     Set(Ljm, DataCardValueLjms.SelectedItems)
    
     );
    
    )

    try this

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

Understanding Microsoft Agents - Introductory Session

Confused about how agents work across the Microsoft ecosystem? Register today!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,679 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 66,015 Most Valuable Professional

Leaderboard