Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Maintain the consistency of screen mode

(0) ShareShare
ReportReport
Posted on by 40

Hi,

 

I have a gallery page and 3 screens for showing 3 sections of the form respectively.  The gallery page has a + button to create page and i set OnSelect = ResetForm(Form1);NewForm(Form1);ResetForm(Form2);NewForm(Form2);ResetForm(Form3);NewForm(Form3);Navigate(Screen1,ScreenTransition.Fade);

 

For the arrow button, i set OnSelect =

Set(varRecord, ThisItem);ViewForm(Form1);Navigate(Form1,Fade)

so that it starts the page 1 of the form in View Mode.

 

However, when I click the button in the "Next" button (Navigate(Screen2,Fade)), screen2 and screen3 are always shown in edit mode. I would like to ask how i can keep it as View mode if i start clicking the arrow button in the gallery.

 

Thank you.

 

  • WarrenBelz Profile Picture
    WarrenBelz 145,636 on at
    Re: Maintain the consistency of screen mode

    @thgtang ,'

    Your last post did not really help me understand the issue any better. To display the information, your form needs to be in Edit or View mode and also the Items of the form needs to reflect the item selected in the gallery. 

  • thgtang Profile Picture
    thgtang 40 on at
    Re: Maintain the consistency of screen mode

    Hi,

     

    I have a gallery page, with a link to the details form which is split into 3 screens, screen1, screen2 and screen3. You may view the details form by clicking the right arrow with OnSelect = Set(varRecord, ThisItem);ViewForm(Form1);Navigate(Screen1,Fade) or by clicking the cross button with

     

    OnSelect = ResetForm(Form1);NewForm(Form1);ResetForm(Form2);NewForm(Form2);ResetForm(Form3);NewForm(Form3);Navigate(Screen1,ScreenTransition.Fade);

     

    If I click the right arrow button, all the form should be in view mode. While if i click the cross button, all the form should be in new mode.

     

    In Screen1 and Screen2, there is a next button with

    OnSelect = If(
    Form1.Mode = FormMode.Edit,
    EditForm(Form2),
    ViewForm(Form2)
    );
    Navigate(Screen2, Fade)

     

    The problem is that when I click the right arrow button, and then clicking the next button moving to screen2, and to screen3, the form information cannot be displayed.

     

    Thank you.

     

     

  • WarrenBelz Profile Picture
    WarrenBelz 145,636 on at
    Re: Maintain the consistency of screen mode

    @thgtang ,

    Can we regroup a bit here - can you please tell me exactly what you want done or we will keep going in circles.

  • thgtang Profile Picture
    thgtang 40 on at
    Re: Maintain the consistency of screen mode

    Thanks. But there is a problem that when i go to screen2, the value of records cannot be shown and all fields are null. Is that i need to set something else?

     

     

  • WarrenBelz Profile Picture
    WarrenBelz 145,636 on at
    Re: Maintain the consistency of screen mode

    @thgtang ,

    Then you simply need to check Form1 

    If(
     Form1.Mode = FormMode.Edit,
     EditForm(Form2),
     ViewFrom(Form2)
    );
    Navigate(Screen2)

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

  • thgtang Profile Picture
    thgtang 40 on at
    Re: Maintain the consistency of screen mode

    but if I click the create button and trigger the same screen1, will the screen2 will be in view mode all the time. is that I need to check the display mode of screen1 first before deciding the display mode of next screen.

     

    Thanks 

  • WarrenBelz Profile Picture
    WarrenBelz 145,636 on at
    Re: Maintain the consistency of screen mode

    Hi @thgtang ,

    You just need to do the same for the next screen

    ViewForm(Form2);
    Navigate(Screen2,Fade)
    

     

    Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

    Visit my blog Practical Power Apps

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

Microsoft Kickstarter Events…

Register for Microsoft Kickstarter Events…

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Announcing Forum Attachment Improvements!

We're excited to announce that attachments for replies in forums and improved…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 145,636

#2
RandyHayes Profile Picture

RandyHayes 76,287

#3
Pstork1 Profile Picture

Pstork1 64,942

Leaderboard