I am getting the blank values in all the gallery controls (Text boxes and dropdown). The rows are getting inserted in SharePoint as blank.
Solved! Go to Solution.
Hello @Vetri_V
I tried replicating your setup and working on a short demo to solve your issue. The reason why it's not working is the controls (highlighted in red) you are using will always be empty outside the Gallery control. You need a way to see the data and the best method would be using a collection.
This is just a short 10-minute demo on how you can approach this.
OnStart:
ClearCollect(colABC, {Title:"", Lot_Number:"", Nr_Packs: "", Actual_Weight: "", Sealed: {Value:""}});
+ icon
Collect(colABC, {Title:"", Lot_Number:"", Nr_Packs: "", Actual_Weight: "", Sealed: {Value:""}});
Trash icon
Remove(colABC,ThisItem)
Add Button
ForAll(
addLogistics.AllItems,
Patch(Logistics,
{
Title: "ABC",
Lot_Number: ThisRecord.Lot_Number,
NrPacks: ThisRecord.Nr_Packs,
'Actual Weight': ThisRecord.Actual_Weight,
Sealed: ThisRecord.Sealed
}
)
);
Clear(colABC);
The OnChange Codes:
Lot: Patch(colABC,ThisItem,{Lot_Number: Self.Text})
NR: Patch(colABC,ThisItem,{Nr_Packs: Self.Text})
Weight: Patch(colABC,ThisItem,{Actual_Weight: Self.Text})
Sealed: Patch(colABC,ThisItem,{Sealed: {Value: Self.Selected.Value}})
Sealed.Items: Choices([@Logistics].Sealed)
✔️ | Just in case my response helped you solve your problem, please mark/accept this as a SOLUTION. This helps community members if they experience a similar issue in the future. |
🔗 | 🕸bistek.space 🐦 @cha_bistek 📺 @BisTekSpace |
Just in case you my answer helped you solve your problem, please mark/accept this as a SOLUTION. This helps community members if they experience a similar issue in the future. |
bistek.space @charv3n @BisTekSpace |
Hi @Vetri_V,
If you select some of the fields values like txtLotNumber.Text in the formula bar, are non-blank values shown?
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
@Vetri_V are the fields in SP defined as number fields?
In that case try wrapping Value() around the Textfields.
For Sealed try and replace Sealed: ddSealed.Selected, with:
Sealed: {Value: ddSealed.Selected.Value}
I hope this helps!
Good question. Here are few screenshots.
Values entered in Gallery
Formula bar
Thanks @Vetri_V. I would expect txtLotNumber.Text to show data "23r23" instead of Blank.
Could it be that the Lot Number text box is called something other than txtLotNumber?
If you select the text input, what is the name of the control in the properties pane?
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Thank you for the prompt response. Here is the screenshot.
Thanks @Vetri_V. That screenshot helps because we can see that the text input is indeed the txtLotNumber control.
Also, that text input control is inside of a gallery (addLogistics), and there may be multiple records within the gallery which may explain why we see Blank when selecting the control in the formula bar.
The code you initially posted looks fine so not sure why it's not working. Another test to try would be to save the addLogistics.AllItems to a collection first then view the collection data in the formula bar to see if the data shows as expected.
Also, there are similar posts online where people are experiencing a similar issue, I hope they can help: https://powerusers.microsoft.com/t5/Building-Power-Apps/Patch-all-items-in-Gallery/td-p/66288
If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.
Hello @Vetri_V
I tried replicating your setup and working on a short demo to solve your issue. The reason why it's not working is the controls (highlighted in red) you are using will always be empty outside the Gallery control. You need a way to see the data and the best method would be using a collection.
This is just a short 10-minute demo on how you can approach this.
OnStart:
ClearCollect(colABC, {Title:"", Lot_Number:"", Nr_Packs: "", Actual_Weight: "", Sealed: {Value:""}});
+ icon
Collect(colABC, {Title:"", Lot_Number:"", Nr_Packs: "", Actual_Weight: "", Sealed: {Value:""}});
Trash icon
Remove(colABC,ThisItem)
Add Button
ForAll(
addLogistics.AllItems,
Patch(Logistics,
{
Title: "ABC",
Lot_Number: ThisRecord.Lot_Number,
NrPacks: ThisRecord.Nr_Packs,
'Actual Weight': ThisRecord.Actual_Weight,
Sealed: ThisRecord.Sealed
}
)
);
Clear(colABC);
The OnChange Codes:
Lot: Patch(colABC,ThisItem,{Lot_Number: Self.Text})
NR: Patch(colABC,ThisItem,{Nr_Packs: Self.Text})
Weight: Patch(colABC,ThisItem,{Actual_Weight: Self.Text})
Sealed: Patch(colABC,ThisItem,{Sealed: {Value: Self.Selected.Value}})
Sealed.Items: Choices([@Logistics].Sealed)
✔️ | Just in case my response helped you solve your problem, please mark/accept this as a SOLUTION. This helps community members if they experience a similar issue in the future. |
🔗 | 🕸bistek.space 🐦 @cha_bistek 📺 @BisTekSpace |
Just in case you my answer helped you solve your problem, please mark/accept this as a SOLUTION. This helps community members if they experience a similar issue in the future. |
bistek.space @charv3n @BisTekSpace |
Perfect! This is what I tried few minutes back and it worked. Thank you!
Glad you got it sorted.
Just in case you my answer helped you solve your problem, please mark/accept this as a SOLUTION. This helps community members if they experience a similar issue in the future. |
bistek.space @charv3n @BisTekSpace |
User | Count |
---|---|
122 | |
87 | |
86 | |
75 | |
67 |
User | Count |
---|---|
214 | |
180 | |
137 | |
96 | |
83 |