cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
NitroPepsi
Helper IV
Helper IV

Set(varProvRecord, Blank()); <- This is giving me an error

Hello, the rest of the formula is coming back fine except when I do the Set command. Can anyone tell me why this is happening?

 

Set(varRecord, Patch('[incentive_test].[D_eTime]', Defaults('[incentive_test].[D_eTime]'),{PROVIDERNUMBER:"000000", Employee_Display_Name:"Please Select Provider", d_provider_ky:-1}));
EditForm(FormEdit);
Navigate(scnUpdate,None);
Set(varProvRecord, Blank());

 

 

NitroPepsi_0-1662862987086.png

 

1 REPLY 1
WarrenBelz
Super User
Super User

Hi @NitroPepsi ,

That is because the structure of the Variable is a Record in the Patch and then a single value below, so you would need

Set(
   varProvRecord,
   Defaults('[incentive_test].[D_eTime]')
)

in the bottom item. But I have to wonder why you are setting a Variable, then immediately clearing it - why not set it to a blank record in the first place ?

 

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.

Visit my blog Practical Power Apps

 

 

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.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

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 (3,968)