web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Contents of the Textbo...
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!

 

 
 
 
 

 

Categories:
  • Verified answer
    madlad Profile Picture
    2,637 Moderator on at

    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! 🙂

  • QuentinDURIEZ Profile Picture
    577 Moderator on at

    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, 

  • Del-Dev Profile Picture
    160 on at

    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!

  • Verified answer
    QuentinDURIEZ Profile Picture
    577 Moderator on at

    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

    Hi @QuentinDURIEZ,

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

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 405 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 368

#3
WarrenBelz Profile Picture

WarrenBelz 244 Most Valuable Professional

Last 30 days Overall leaderboard