I have an app that is connected to an Excel. So I created a data worksheet with all the columns. I need a dropdown in my app so I created a Table on a new tab(sheet) with the items I needed to have on the dropdown.
I was able to create my dropdown in the app.
But ......
How do I connect the selected dropdown Item to my data work sheet when it is submitted?
Solved! Go to Solution.
Hi @Anonymous ,
The xxxx depends on the Items of your drop-down.
If you type Dropdown2.Selected. (note second dot), you will see the valid values underneath.
There are also two options depending on whether you are creating a new record or are wanting to edit the existing one
For existing (which is what I think you are asking), you have to refer to the "key" or unique matching field in the list that is also on your screen (you have to tell Power Apps which record to match). If the control running this code is inside (not on) a form or gallery you can simply use ThisItem (instead of the reference you need to find on the third line of the code). So assuming option 1
UpdateIf(
QB_Invoice,
MatchingFieldName=YourMatchingControlNameValue,
{Item:Dropdown2.Selected.Value}
)
OR
UpdateIf(
QB_Invoice,
ThisItem,
{Item:Dropdown2.Selected.Value}
)
I assume your reference to Item is tot he field name to be updated.
For a new record
Patch(
QB_Invoice,
Defaults(QB_Invoice),
{Item:Dropdown2.Selected.Value}
)
Happy to elaborate further.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @Anonymous ,
Follow the below steps:
I hope this resolved your issue if you see any challenge let me know I am always happy to help.
Regards,
Krishna
If this post helps give a 👍 and if it solved your issue consider Accept it as the solution to help the other members find it more.
Hi @Anonymous ,
You can use Patch or UpdateIf to send the control selected items to the field.
UpdateIf(
YourRecordKey Field = List KeyFieldName,
{YourColumnName:YourDropDownName.Selected.xxxx} //Value,Result/Field Name depending on Items
)
Happy to elaborate further.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi@Andreag,
Do you mean that you want to update the dropdown related records to your data worksheet?
From your description, I'm guessing you have 2 excel sheets. One for the data source, another for the sheet of selections connected to the dropdown control.
I assume that you want to save your dropdown selected items to your data worksheet when you submit. On this premise, I think the Patch function can achieve your needs. Please take a try as below:
Set the Items property of the Dropdown as below:
Distinct(Table2, ColumnA)
Set the OnSelect property of your Submit button as below:
Patch(
DataSource,
Defaults(DataSource),
{ColumnName: Dropdown4.Selected.Value}
)
Note: DataSource is your data worksheet.
Best Regards,
Qi
Thank you very much!
Im very much new at this can you please explain what the xxxx would be? My dropdown is a list of Services we provide (no numbers or values) so would the xxxx be .text? or something else?
Also the section Field name depending on Items ... is that where I would list my dropdown items? not 100% sure what that would be.
here is what I have... am I close?
UpdateIf(QB_Invoice,Item,{Item:Dropdown2.Selected.xxxx}//Value,Results/Field Name depending on Items )
QB_Invoice is the main data source that I need the dropdown data to go to
QB_Invoice column that I need the info to go to is called Item
Table2 (which is the Dropdown excel table)
Table2 dropdown header is called Items
Dropdown name is Dropdown2
Hi @Anonymous ,
The xxxx depends on the Items of your drop-down.
If you type Dropdown2.Selected. (note second dot), you will see the valid values underneath.
There are also two options depending on whether you are creating a new record or are wanting to edit the existing one
For existing (which is what I think you are asking), you have to refer to the "key" or unique matching field in the list that is also on your screen (you have to tell Power Apps which record to match). If the control running this code is inside (not on) a form or gallery you can simply use ThisItem (instead of the reference you need to find on the third line of the code). So assuming option 1
UpdateIf(
QB_Invoice,
MatchingFieldName=YourMatchingControlNameValue,
{Item:Dropdown2.Selected.Value}
)
OR
UpdateIf(
QB_Invoice,
ThisItem,
{Item:Dropdown2.Selected.Value}
)
I assume your reference to Item is tot he field name to be updated.
For a new record
Patch(
QB_Invoice,
Defaults(QB_Invoice),
{Item:Dropdown2.Selected.Value}
)
Happy to elaborate further.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
Hi @Anonymous
Just checking if you got the result you were looking for on this thread. Happy to help further if not.
Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.
User | Count |
---|---|
251 | |
102 | |
94 | |
48 | |
37 |