cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
afeenan
Regular Visitor

Cannot use patch function to pass dropdown data selection to Excel

Hi,

 

I have tried using both of the below on a 'Submit' button in my app.

Patch(Requests, Defaults( Requests ) ,{Space: Dropdown1.Selected})

Patch(Requests, Defaults( Requests ) ,{Space: Dropdown1.SelectedText})

 The error I get is "This type of argument 'Space' does not match the expected type 'Text'. Found type 'Record'.

 

The drop-down data is from a table in another excel file.

 

I would appreciate any help or advice.

1 ACCEPTED SOLUTION

Accepted Solutions
PG_WorXz10
Community Champion
Community Champion

Hi @afeenan ,

 

Please try the below formula. Instead of value if you used some other column select that column name. 

 

Patch(Requests, Defaults( Requests ) ,{Space: Dropdown1.Selected.Value})

 

 

 

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

View solution in original post

4 REPLIES 4
surajkv
Helper II
Helper II

Hi @afeenan 

can you please try this

Patch(Requests, Defaults( Requests ) ,{Space: Text(Dropdown1.Selected)})

or
Patch(Requests, Defaults( Requests ) ,{Space: Value(Dropdown1.Selected)})

or
Patch(Requests, Defaults( Requests ) ,{Space: Value(Dropdown1.Selected.Value)})

Thanks for your reply. I have tried both options and both return the same error:

"Expected text or number. We expect text or a number at this point in the formula"

 

 

PG_WorXz10
Community Champion
Community Champion

Hi @afeenan ,

 

Please try the below formula. Instead of value if you used some other column select that column name. 

 

Patch(Requests, Defaults( Requests ) ,{Space: Dropdown1.Selected.Value})

 

 

 

If this post was helpful or you need more help please consider giving Thumbs Up and Tag me in your reply I'll be happy to help. If this post helped you solve your issue please click Accept as solution and provide Thumbs Up. This will help others find it more readily.

Hi @PG_WorXz10 

 

I have edited my respone.

 

When I swap 'value' with the column name it works fine.

 

Thank you very much.

 

 

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,224)