Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Answered

Contents of the Textboxes Disappears After Button Pressed

(1) ShareShare
ReportReport
Posted on by 160

Hi guys! I'm looking into creating a gallery that would execute repeating tables, with reference to Shane Young's YouTube tutorial on PowerApps Repeating Tables like InfoPath Part 1 - Enter the data: PowerApps Repeating Tables like InfoPath Part 1 - Enter the data (youtube.com)

 

The intended outcome would be when I pressed the "Done" Button after entering all the fields in the textboxes in the gallery, a fresh gallery pops out right below it and the contents that was just entered in the first gallery remains there. But my issue is, when the fresh gallery pops out right below the first gallery after the "Done" button is pressed, the content in the textboxes in the first gallery disappears. I have not used any form controls, just a vertical gallery in a screen.

 

This is a button where once it is pressed, it would bring me to the screen that has a gallery in a screen:
DelDev_2-1720790145918.png

 

And the following is the expression for the "Next Page" button:

ClearCollect(BZZCollection,{LineNomValStraight: 0, LineActStraight: 0, LineNomValCurve: 0, LineActCurve: 0}); Navigate(TrialPage)

 

 

The screenshot below shows a "TrialPage" screen with a gallery after the "Next Page" button is pressed and before the "Done" button is pressed:

 

DelDev_0-1720797527524.png

 

 

 

The screenshot below shows after the "Done" button is pressed:

 

DelDev_1-1720797679572.png

 

 

The expression for my "Done" button is as follows:

Patch(BZZCollection,ThisItem,{LineNomValStraight: InputNomiValStr, LineActStraight: InputActlValStr, LineNomValCurve: InputNomiValCur, LineActCurve: InputNomiValCur}); Collect(BZZCollection,{LineNomValStraight:0, LineActStraight:0, LineNomValCurve:0, LineActCurve:0})
 
 
Did I missed any steps or is there any steps I have done wrongly? Thanks!

 

 
 
 
 

 

  • Del-Dev Profile Picture
    160 on at
    Re: Contents of the Textboxes Disappears After Button Pressed

    Hi @QuentinDURIEZ,

    I've got it! Thanks for your help!!!

  • Verified answer
    QuentinDURIEZ Profile Picture
    505 Super User 2025 Season 1 on at
    Re: Contents of the Textboxes Disappears After Button Pressed

    OK so the default properties are good, the problem might be the patch formula like @madlad said in his post : 


    If "InputActlValStr" is the textbox name, you cannot just use it the patch the column since it's a control, not a value, that's why you need to use InputActlValStr.Text to get the actual input value in order to update the column value 

    Regards,



  • Del-Dev Profile Picture
    160 on at
    Re: Contents of the Textboxes Disappears After Button Pressed

    Hi @QuentinDURIEZ,

    Thank you for your suggestion! Referring to your first part of suggestion, for example, my first textbox's Default property has this expression: ThisItem.LineNomValStraight. So I'm wondering which property should I put the line that you have suggested "InputNomiValStr.Value"? So far for the list of properties for the textbox, I have only seen the "Default" property and I have not seen properties for Text and Value. I'm quite lost about that and need an advice on this thanks!

  • QuentinDURIEZ Profile Picture
    505 Super User 2025 Season 1 on at
    Re: Contents of the Textboxes Disappears After Button Pressed

    Hello ! 

    You should watch the Default" or "Text" (or "Value") property of the textboxes : since your patching the datasource, the gallery refreshes and the controls go back to their default values


    Put on the Value property of each textboxes the corresponding line :

    InputNomiValStr.Value = ThisItem.LineNomValStraight
    InputActlValStr.Value = ThisItem.LineActStraight
    InputNomiValCur.Value = ThisItem.LineNomValCurve
    InputNomiValCur.Value = ThisItem.LineActCurve


    I see also an error in the patch function : 

    Patch(MeasureCollection,ThisItem,{LineNomValStraight: Value(InputNomiValStr.Value), LineActStraight: Value(InputActlValStr.Value), LineNomValCurve: Value(InputNomiValCur.Value), LineActCurve: Value(InputNomiValCur.Value)}); Collect(MeasureCollection,{LineNomValStraight:0, LineActStraight:0, LineNomValCurve:0, LineActCurve:0})

    In your version, you seems to patch columns with the control, but you need to precise the Value property, and convert it to a number for your collection

    Regards, 

  • Verified answer
    madlad Profile Picture
    2,637 Super User 2025 Season 1 on at
    Re: Contents of the Textboxes Disappears After Button Pressed

    Hi!

     

    It seems to me that the problem could be in your patch:

    Patch(

        MeasureCollection,

        ThisItem,

        {

          LineNomValStraight: InputNomiValStr,

          LineActStraight: InputActlValStr,

          LineNomValCurve: InputNomiValCur,

          LineActCurve: InputNomiValCur

        }

    );

     

    In Shane's video, here he uses the controls to define these, but you've got what seems to be variables. Where are these defined? I would say, if possible, you should reference the controls like he does. If these are control names, just reference the control's value(i.e for a text input, use .Text, ect.)

     

    Let me know! 🙂

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

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,524 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,906 Most Valuable Professional

Leaderboard