我如何在Power App垂直画廊中获取每个输入元素,每次获得最后一个值
我正在尝试在电源应用程序中创建动态输入组件,为此我使用了垂直画廊,在该垂直画廊中,我有一个水平容器来正确对齐输入,然后我下面有几个输入。我正在尝试使用“ forall”循环从画廊获取输入值,但我只能获得最后一项的值。
以下是画廊的结构,
DynamicComponentsGallery
---- HorizontalContainer
---- ---- Input1Text
---- ---- Input2Date
---- ---- Input3Text
---- ---- AddNewElementToGalleryButton
假设我在画廊中有2行,并且
Test1Rec1 20/08/2022 Test1Rec2
Test2Rec1 12/12/2022 Test2Rec2
每次尝试使用“ Forall”获取记录时,
ForAll(DynamicComponentsGallery.AllItems, {
input1 : Input1Text.Text,
input2 : Text(Input2Date.SelectedDate, DateTimeFormat.ShortDate),
input3 : Input3Text.Text,
});
我都会
Test2Rec1 12/12/2022 Test2Rec2
Test2Rec1 12/12/2022 Test2Rec2
插入这样 的记录。
I am trying to create dynamic input components in the power apps for that I have used Vertical Gallery, and Within that vertical gallery I have a Horizontal container to align the inputs properly, and then I have several inputs under it. I am trying to get the input values from the gallery using "ForAll" loop but I am getting the value of the last Item only.
Below is the structure of the gallery
DynamicComponentsGallery
---- HorizontalContainer
---- ---- Input1Text
---- ---- Input2Date
---- ---- Input3Text
---- ---- AddNewElementToGalleryButton
suppose I have 2 rows In my gallery and I have inserted the records like this
Test1Rec1 20/08/2022 Test1Rec2
Test2Rec1 12/12/2022 Test2Rec2
Every time I try to fetch the record using "ForAll"
ForAll(DynamicComponentsGallery.AllItems, {
input1 : Input1Text.Text,
input2 : Text(Input2Date.SelectedDate, DateTimeFormat.ShortDate),
input3 : Input3Text.Text,
});
I Always get 2 record with the values
Test2Rec1 12/12/2022 Test2Rec2
Test2Rec1 12/12/2022 Test2Rec2
Same Goes for any number of records.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
考虑到我有一个带有2个项目的画廊,并且每个项目都有一个文本框,供用户输入一些数据。这是我在按钮上的样子:
Considering that I have a gallery with 2 items and each item has a textbox for the user to input some data. Here's how I would have on the button: