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.
And the following is the expression for the "Next Page" button:
The screenshot below shows a "TrialPage" screen with a gallery after the "Next Page" button is pressed and before the "Done" button is pressed:
The screenshot below shows after the "Done" button is pressed:
The expression for my "Done" button is as follows:
Hi @QuentinDURIEZ,
I've got it! Thanks for your help!!!
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,
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!
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,
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! 🙂
WarrenBelz
146,524
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,906
Most Valuable Professional