Hi
I want to generate textbox in the form on button click .
Scenario : Form with Quote field , number of quote may change in each request . So I want to provide an add button to user, on-click it should add one more textbox to add a new quote . I know i can not create a new column on SP list but I can store all the quotes with comma separated . So I just want to build the form for enduser , where they will fill quotes in different text fields.
Please let me know if you need any more information .
Thanks
Gautmish
Solved! Go to Solution.
Hi @gautmish,
This can be achieved, but not inside a Form control. You need to create the textinput control outside the form, and then use a Patch function to update the records to SharePoint list.
In Screen1, add multipleTextInput controls and a button control, set below formulas to make this work:
Screen1.OnVisible=Set(Number,1)
Button1.OnSelect=Set(Number,Number+1)
TextInput2.Visible=If(Number>=2,true,false)
TextInput3.Visible=If(Number>=3,true,false)
TextInput4.Visible=If(Number>=4,true,false)
...
....
.....
About how to use Patch to create a new record, the formula should be something like:
Patch(List,Defaults(List),
{Title:
Concatenate(TextInput1.Text," ",TextInput2.Text," ",TextInput3.Text),
...})
Regards,
Mona
Hi @gautmish
To add a field at button click, you can use popup.
Basically insert a text box & set the 'visible' parameter to Popup = true
And insert a button and put 'onselect' parameter to Updatecontext({Popup: true}).
So when a user clicks on the button the text box would appear.
One more thing, on your 'Save' button again use 'Updatecontext' to make Popup:false.
Then the text box would be gone after saving.
Hi @Pat_Wickramage,
Thank you for your Reply . As i have mentioned , we are not sure , how many quotes we needed per request . So it will be difficult to create predefined textboxes and change the visible property .
Thanks
Gautmish
Noted. I had a similar requirement sometime back & de client was happy with 3 new fields. So it wasnt a major issue for me.
Good luck.
Hi @gautmish,
This can be achieved, but not inside a Form control. You need to create the textinput control outside the form, and then use a Patch function to update the records to SharePoint list.
In Screen1, add multipleTextInput controls and a button control, set below formulas to make this work:
Screen1.OnVisible=Set(Number,1)
Button1.OnSelect=Set(Number,Number+1)
TextInput2.Visible=If(Number>=2,true,false)
TextInput3.Visible=If(Number>=3,true,false)
TextInput4.Visible=If(Number>=4,true,false)
...
....
.....
About how to use Patch to create a new record, the formula should be something like:
Patch(List,Defaults(List),
{Title:
Concatenate(TextInput1.Text," ",TextInput2.Text," ",TextInput3.Text),
...})
Regards,
Mona
The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.
This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.
User | Count |
---|---|
182 | |
52 | |
41 | |
39 | |
33 |
User | Count |
---|---|
247 | |
80 | |
71 | |
70 | |
66 |