Hey all
I want to know if it is possible to Patch a Textbox.Text into a SharePoint lookup column?
And how is it done?
If this would be possible all my problems would be solved!!!
Thanks in advance
Kind regards
Tom
If this reply has answered your question or solved your issue, please mark this question as answered.
Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.
Solved! Go to Solution.
Hi @Tom_Slosse
It seems as though you actually only have one SharePoint column in the 'My Lunch' list, and the column is simply Code. Don't be confused by the extra columns that SharePoint creates when you choose to display extra columns.
So you need to patch simply to that column:
Patch('My Lunch', MyItem, {Code: {Id: Dropdown1.Selected.ID, Value: Dropdown1.Selected.Title, '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"}})
Obviously you need to specify the item where I have simply written MyItem, and if you want to create a new item then use Defaults('My Lunch') instead.
Try to just put hard values for Id and Value and see if it works, then you can link back to your control.
Hi @Tom_Slosse
I would suggest you try creating a new test list and a new blank app and see if this works for you doing the steps exactly as indicated:
If it does not, then I will try to reproduce myself again. If it does, then you will have a much clearer idea of what needs to be done.
Hey @Meneghino
I read this post before and was really interessting but I think my problem is somewhat different
Let me try and explain what my situation is 🙂
So i have a Gallery from the Source 'Broodjes' looking like this:
When I click on the icon we move to the next screen looking like this:
where the textboxes are filled in with the selected item from the BroodjesGallery:
But now comes the tricky part, when I click save I want to patch it all into another list, that is called 'My Lunch', by using the Patch function.
Looks easy on first sight I thought but here is the thing, in 'My Lunch' list all the columns are lookup fields like so:
All the fields are actually derived from Code in the 'Broodjes' list:
I hope I was clear enough with my problem if not please let me know, I would be grateful if this would work
Thanks in advance
Kind regards
Tom
If this reply has answered your question or solved your issue, please mark this question as answered.
Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.
Hi @Tom_Slosse
It seems as though you actually only have one SharePoint column in the 'My Lunch' list, and the column is simply Code. Don't be confused by the extra columns that SharePoint creates when you choose to display extra columns.
So you need to patch simply to that column:
Patch('My Lunch', MyItem, {Code: {Id: Dropdown1.Selected.ID, Value: Dropdown1.Selected.Title, '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"}})
Obviously you need to specify the item where I have simply written MyItem, and if you want to create a new item then use Defaults('My Lunch') instead.
Try to just put hard values for Id and Value and see if it works, then you can link back to your control.
Hey @Meneghino
Thanks for your quick response, I will try it immediately!
And what do you mean by hard values?
Kind regards
Tom
If this reply has answered your question or solved your issue, please mark this question as answered.
Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.
I mean something like:
Patch('My Lunch', Defaults('My Lunch'), {Code: {Id: 1, Value: "Title of ID 1", '@odata.type': "#Microsoft.Azure.Connectors.SharePoint.SPListExpandedReference"}})
Hey @Meneghino
The Patch works but still only saves the date and the matching text values and the toggle, but the rest (the important information) still doesnt save.
But the ordered item comes in the BrowseScreen so we are a step closer to the solution!
So thanks for that already 🙂
Here are some screenshots below of what it looks like in the SharePoint list now:
Thanks for your help already really appreciate your efforts!!!
Kind regards
Tom
If this reply has answered your question or solved your issue, please mark this question as answered.
Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.
You need to make sure Id and the Value are really matched. Is your Id 1 really "Kaas, hawaii etc."?
Or is it Code?
Did you rename the Title column? If so to what?
Otherwise it will not save.
Hey @Meneghino
My Id is Code indeed. "Kaas,hawaii" is actually the description that is linked with the Code.
So thats why I have columns like this: Code_x003a_Description Code_x003a_Price, Code_x003a_Size, Code_x003a_Supplier
I didnt change Title in both lists, I only set them to hidden in the lists:
Kind regards
Tom
If this reply has answered your question or solved your issue, please mark this question as answered.
Answered questions helps users in the future who may have the same issue or question quickly find a resolution via search. If you liked my response, please consider giving it a thumbs up.
OK, clear. Value in the Patch expression should contain the Title.
If you have nothing there, then try "", but I am not sure it will work.
If not, then experiment with another list and putting the Title to "AAA" or something.
If that works, then just put AAA in all Titles of your code table.
Please let me know how you get on.
User | Count |
---|---|
253 | |
106 | |
88 | |
51 | |
43 |