Тёмный

Power Apps Patch Record Variable + Trim, Len, and Troubleshooting 

Shane Young
Подписаться 163 тыс.
Просмотров 15 тыс.
50% 1

In this video, you will learn how to patch a Record Variable in PowerApps. And along the way you will get to see the data problem that caused me to figure how to do this and the usage of Trim and Len functions. Lots of Fun!
Power Apps Training at training.PowerApps911.com

Наука

Опубликовано:

 

14 июн 2020

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 75   
@tommyhamilton1520
@tommyhamilton1520 4 года назад
Love these types of videos, real world problems. Great fix.
@ShanesCows
@ShanesCows 4 года назад
Thanks Tommy. Showing my pain seems to help a lot of people. 😀
@ImranAmiKh4n
@ImranAmiKh4n Год назад
Genius. Was about to spend likely 4 hours figuring out a solution to a specific problem but then wisely checked if you had cracked it already. Thank you!
@ShanesCows
@ShanesCows Год назад
Glad to help. 😀
@patrickcooley9708
@patrickcooley9708 4 года назад
Shane, so many good quotes in this video "it's okay to blame PowerApps" was one that made me laugh...also the one about getting out your abacus to come up with a solution. You have a gift of teaching this stuff to the frustrated and struggling. I appreciate how real you make it!
@ShanesCows
@ShanesCows 4 года назад
Glad you enjoy my goofiness Patrick. Thanks 🙏
@jray1429
@jray1429 3 года назад
Thank you very much…Showing is how you troubleshoot is very helpful! As you know, we spend a LOT of time doing that. It’s good to see how others do that. Thanks!
@ShanesCows
@ShanesCows 3 года назад
You're welcome!
@puppydood
@puppydood 3 года назад
Thanks Shane. Everyone needs a nerdy friend. 😊. Troubleshooting tips are so helpful.
@ShanesCows
@ShanesCows 3 года назад
Absolutely! 🐶
@headflask
@headflask 3 года назад
The reminder that the patch needs to get set saved me a bit of time. Luckily I stumbled on it when I needed it. Thanks.
@headflask
@headflask 3 года назад
And I do use these function nitty griity videos a lot. Just need to make sure my weird search matches your metadata.
@samaritanlucas8680
@samaritanlucas8680 3 года назад
When I applied the patch variable method in this video, my apps started freaking out and saying the variable now was an incompatible type. Every time I set the variable from a gallery with ThisItem, Power apps recognized it as a record type variable. When I tried to patch the record with Set(Variable, Patch(Variable... , Power Apps recognized it as an Error type, which broke everything. After a little testing, I think I found a different way to patch a variable. With this method, you aren't actually "patching" the variable, but rather resetting the variable with the updated value that was edited. the formula is: Set(Variable, Lookup(Source, UniqueIDField = Variable.UniqueIDField)) This seems to work for me and PA doesn't get all freaked out. Thanks Shane for your great videos, tips, and troubleshooting! You are a great teacher.
@ShanesCows
@ShanesCows 3 года назад
Glad you got it. We use this a lot and it works but one of my customers had a similar error. 😕 Still not sure why.
@ronbakker1300
@ronbakker1300 Год назад
14:15 Oh the misery you have saved me Shane, thanks again.
@ShanesCows
@ShanesCows Год назад
Happy to help 😎
@troybarrett235
@troybarrett235 4 года назад
Thanks Shane! I had a similar problem when sending info to power automate where the convert file type didn't like the space. The trim function has just solved that! Life saver :)
@ShanesCows
@ShanesCows 4 года назад
Awesome!
@leonelbraga5427
@leonelbraga5427 4 года назад
You are the best, Shane!
@ShanesCows
@ShanesCows 4 года назад
Thanks 😊
@HenriqueSilvestre
@HenriqueSilvestre 4 года назад
Thanks a million Shane for showing me that I'm not the only one blessed with those weird power apps behavior! :)
@ShanesCows
@ShanesCows 4 года назад
It is a fun game for sure!
@mblherry
@mblherry Год назад
Thank you sooooo much I have being pull my hair out with this.
@ShanesCows
@ShanesCows Год назад
You are so welcome!
@asifkhawaja
@asifkhawaja 4 года назад
Another nice one Shane!
@ShanesCows
@ShanesCows 4 года назад
Thank you Asif!
@jyothisrinivas6637
@jyothisrinivas6637 4 года назад
Nice video and also learn new things from it.
@ShanesCows
@ShanesCows 4 года назад
Glad to hear that
@jray1429
@jray1429 3 года назад
PowerApps seems to have more difficulty with it working correctly when developing things. I too, have found something that doesn’t work and then I wait a minute, or take the code out and put it back in, or reboot it…. Then amazingly it might work! Considering it’s basically all web based and no local application, like having Visual Basic, power apps works amazingly well. I’m surprised it doesn’t have more hiccups or attitudes. I like it a lot!
@ToddWheeler253
@ToddWheeler253 Год назад
OMG YES!!!! Thank you!
@ShanesCows
@ShanesCows Год назад
You are so welcome!
@gerfer6261
@gerfer6261 4 года назад
Cool , keep coming
@ShanesCows
@ShanesCows 4 года назад
Will do. 😎
@WhatIsThis.WhyDoINeedIt
@WhatIsThis.WhyDoINeedIt 3 года назад
Love your videos Shane, it's helped me on many occasions. I have a strange issue with patch... I have used a hybrid editform and submit form and the patch function on different button selects. I select a item from a combox, I then press a button that creates a new record in SharePoint with the item name and current date time. I then get taken to a form with multiple controls and toggles etc. I have an update button that patch's the form when the user needs to update the record but can continue completing the form until they press the submit button. Basically the patch sometimes works and sometimes does not. I'm guessing it's an issue with the lookup of the record title that is the problem.
@ShanesCows
@ShanesCows 3 года назад
I would also guess you have a lookup issue. 😑 With SharePoint I like to use ID for the lookups
@ziadhamandi3595
@ziadhamandi3595 4 года назад
That is fantastic Shane! I use the unique ID in the SQL tables, set to a variable of course, to define my selected Gallery. Your solution seems to be a better option. Thank you. Can you please address the SQL DateTime issue with PowerApps? That is one that I continue to have issues with. Thanks again.
@ShanesCows
@ShanesCows 4 года назад
I do need to cover that one. I will put it back on my list.
@ziadhamandi3595
@ziadhamandi3595 4 года назад
@@ShanesCows Thank you.
@paolovr1970
@paolovr1970 Год назад
Yes 🙏🙏🙏 thanks I need this trick today 😎😎😎 cool
@ShanesCows
@ShanesCows Год назад
Glad to help. 😀
@sundrapillay6668
@sundrapillay6668 4 года назад
Thanks Shane much appreciated can you create a Covid 19 App return to work and and desk allocation
@ShanesCows
@ShanesCows 4 года назад
Desk allocation is interesting. I did do a form covid solution ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-462l8JuJ9xM.html
@williampurcell606
@williampurcell606 2 года назад
Hi Shane, First want to start by thanking your for all that you do. I have learned so much from your videos. I was wondering if you can help me with a Patch question. I have a form that I am using for people to view information on products. I have set the data cards to be visible only if there is a value and is not blank. I want to be able to patch into the data card only if that data card is blank, if it is not blank I want a different data card to get the patch. Is this possible?
@williampurcell606
@williampurcell606 2 года назад
Hi Shane, I wanted to say thank you again. I was actually able to figure out the code I needed to make this work. It took a few hours of giving up and coming back and trying again. I had a few codes that worked, but did not give me the result I was looking for. I saw in another video of yours, you mentioned if a code works, but isn’t 100% what you want you can just add the // and revisit it later if necessary. Well, this is exactly what happened I changed a few things to a pending code and it worked out perfectly. Thank you
@magdialameen7960
@magdialameen7960 4 года назад
Can you please add a video about running total in PowerApps. Thank you!
@ShanesCows
@ShanesCows 4 года назад
Look for my video on Sum. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-DF4KX1oSrVI.html
@rivernet62
@rivernet62 4 года назад
"Four hours in and that's where the madness starts." I'm way ahead of you. I can get to madness in minutes.
@rivernet62
@rivernet62 4 года назад
Most recently I was scooping up some data fields that were not behaving at all right, and came to find that each one had a CRLF at the end :(
@ShanesCows
@ShanesCows 4 года назад
Crazy how a little bad data can drive us crazy :)
@gabrielbraz9669
@gabrielbraz9669 Год назад
I am having a problem with something similar to this. I have a variable that stores the record from a dataverse table, so the column is named after the dataverse column id (ex: "cr590_title"). When I patch to the dataverse like this { Title: "This is a title" }, it works, the correct column is updated. But I am trying to patch to the variable, in this same way, and when I checked, the variable had a new column, (ex: "cr590_title" and "Title"). So it is not updating the right column, it does not even let me use the id name for the column. DO you have any ideia how to fix this?
@mvos1980
@mvos1980 4 года назад
Hi Shane, Create video! The real problem is the application that writes the data in SQL. Before writing the data to the database they must trim the data.
@ShanesCows
@ShanesCows 4 года назад
Agreed!
@MrJonbuoy
@MrJonbuoy Год назад
Hi Shane, odd question on Patching. Can you use a variable column name in a Patch function so you can Copy/Paste the same function to all fields on an edit form? Something like onchange UpdateContext({ctxCurrentColumnName: Parent.DataField}); Patch( Data source, Record to update, {ctxCurrentColumnName: Value(Self.Text)} ); Or is this a step too far?
@ShanesCows
@ShanesCows Год назад
Doesn't work Jon :( There is a lot of that clever stuff I have tried with not luck. Sorry
@franciscolopes8337
@franciscolopes8337 4 года назад
Hello Shane! I'm from Brazil and I developed an application on power apps for my research program in my University, can I register the code of the application? Wich programing language does the powerapps use?
@ShanesCows
@ShanesCows 4 года назад
I am not sure what you mean by register. Power Apps don’t run stand-alone outside of Power Apps.
@mappingman
@mappingman Год назад
They aren't spaces that are being passed by SQL. I have this problem with an export I receive. I look at it in NP++ and the character is hidden not a space. I still don't know what the character is. So this may be why you can't reproduce the incorrect data. What ever application they are using to enter the SQL data is injecting these hidden characters.
@charlesjohnston1575
@charlesjohnston1575 4 года назад
Hi Shane, Is there a way to access a local network file from a powerapp?
@ShanesCows
@ShanesCows 4 года назад
Yes via the on-premises data gateway. I have never done it but I know others have.
@yutikapatel5995
@yutikapatel5995 3 года назад
How do you patch a record if new or upate a record if it is already in sharepoint?
@ShanesCows
@ShanesCows 3 года назад
Use this video to see if a Duplicate exists. ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-Ap3_Ea9H8b0.html
@danielbell9192
@danielbell9192 4 года назад
Hi Shane, I have a gallery where I’m using groupby. When the gallery item is clicked it takes you to another gallery where I am then showing the ‘DATA’. I am wanting to have a trash can so that I can remove an item from the ‘DATA’ and the data source which I have managed to do, however I can’t get the VarRecord to update so that the gallery resets itself and doesn’t show the item I have just deleted. I have tried what you do in this video by setting the VarRecord to a Set(VarRecord (Remove(VarRecord.DATA,thisitem)) but no joy. Any thoughts. When I run the above without the Set it does successfully remove the item from Data, but I can’t get the gallery to update. Any thoughts? Ta
@WhatIsThis.WhyDoINeedIt
@WhatIsThis.WhyDoINeedIt 3 года назад
Try Reset(data source)
@arupjt
@arupjt 4 года назад
Hey Shane! This doesn't work for me. I am setting a context variable on the 1st screen and passing it to the 2nd screen on navigate. Here the attributes of the record variable serves as my default selected items for some controls . On "OnChange" of one control, I need to patch one of the record variable attributes to blank. I tried out the formula that you showed here , but it doesn't work. Did you do any settings changes for it??
@ShanesCows
@ShanesCows 4 года назад
I did not change anything. Try to recreate my exact demo and see if it works.
@arupjt
@arupjt 4 года назад
I see its creating a different column in the record. My source is sharepoint and the column name in sharepoint has a space in between. I guess powerapps do not recognize the space and hence treated it as a different column..thinking of doing an addcolum to the variable where i can set the column name and use the new column instead of the sharepoint one..
@ShanesCows
@ShanesCows 4 года назад
Use ‘column with space’ single quote helps
@rodrik90
@rodrik90 Год назад
i think that the Set patch does not work anymore... now it just adds a new line in the record with the same name and different data
@ShanesCows
@ShanesCows Год назад
I just did a test and it worked the same for me. :( Set(varRecord, Patch(varRecord, {Department: "Test"}))
@beatecno
@beatecno 4 года назад
Hi Shane, I need help. I am creating a collection from a connection to a view of my SQL. However, this view has an invoice filter where I look for the products in the table. When I'm creating the collection, I don't know how to search for my invoice. I did it as follows I created a button, and on that button I made the following formula Collect(ExibeProd; Filter('[dbo].[PA_PROD_NOTA]';DataCardValue1.Text = NOTA )) DataCardValue1.Text is the field where the user places the note number [dbo]. [PA_PROD_NOTA] is the name of my view in the database ExibeProd is the name of my collection. The problem is that not all fields in my search are filled in the collection. [NOTE] column only
@MrXankiller
@MrXankiller 4 года назад
You can't filter results with text inputs If your invoices are all integer, you should use Collect(ExibeProd; Filter('[dbo].[PA_PROD_NOTA]';Value(DataCardValue1.Text) = NOTA ))
@ShanesCows
@ShanesCows 4 года назад
Thanks for the assist 😻
@dimaignatiev6370
@dimaignatiev6370 4 года назад
Did Bold Zebras have become PowerApps?...
@ShanesCows
@ShanesCows 4 года назад
Kind of. More PowerApps911 spun out of Bold Zebras when we decided to become more focused on the Power Platform.
Далее
PowerApps With Function
16:40
Просмотров 40 тыс.
I Built 3 SECRET Rooms In School!
33:34
Просмотров 10 млн
Я НЕ ОЖИДАЛ ЭТОГО!!! #Shorts #Глент
00:19
Наташа Кампуш. 3096 дней в плену.
00:58
Иран и Израиль. Вот и всё
19:43
Просмотров 1,3 млн
Power Apps StartScreen, OnStart, and Deep Linking fix
20:39
PowerApps Filter Gallery by the Current User
22:16
Просмотров 116 тыс.
Power Apps: When to Use Set or UpdateContext
6:33
Просмотров 50 тыс.
PowerApps - Patch Function Error Handling
12:16
Просмотров 17 тыс.
Power Apps Calendar with SharePoint Data
28:44
Просмотров 56 тыс.
Update Vs UpdateIf in Power Apps
7:14
Просмотров 3,3 тыс.