Showing results for 
Search instead for 
Did you mean: 
Impactful Individual
Impactful Individual

Global variable not recognised as a record

My app has two registration forms, each with their own data source - both SP lists. The first registration form is working fine and uses a global variable (varProjects) to save the data on each screen.

So on the home screen, the button which navigates to this form uses this formula:

Set(varProjects, Blank()). There is then a ClearCollect for the navigation menu component and varProjects is referenced under Status.

Status: varProjects.AboutComplete - where AboutComplete is a column in the actual data source.

The variable is referenced as Item on each form for this registation. On each save button, where the form is in edit mode, the formula is:

Patch (
Form_About.Updates, {AboutComplete:true}.


This works absolutely fine. However, if I use another variable for my 2nd registration form with the same formulas, I get errors. So in the ClearCollect when I add: Status: varData.AboutComplete I get this error:

Incompatible type: the 'Status' column in the data source you're updating expects a boolean type and you're using a error type.

My patch on the save button has the following error:

The function 'Patch' has some invalid arguments. Invalid argument type (Boolean). Expecting a Record value instead.

It looks like varData is set to false, but I set it to Blank.

The item is set to varData. Why is it not recognising it as a record value?


Accepted Solutions
Impactful Individual
Impactful Individual

Issue resolved. I removed all reference to the variable, saved and published the app then started again. Seems to be working now.

View solution in original post

Impactful Individual
Impactful Individual

Anyone able to help with this please? I've checked the Variables screen for it and it's set as Boolean with value 'true' yet there is nowhere where it has been defined as this as far as I can see. I've tried removing all mention of the variable and starting again with a new name and it still sets it as a boolean.

These are the two definitions of it: 

In the gallery: 

UpdateContext({conLoading: true});
Set(varYourData, DatasetsGallery.Selected;

Navigate('Dataset About')
UpdateContext({conLoading: false}))


On the button to open the form:

); Set(varYourData, {}; ClearCollect(NavigationMenuData,{Title:"About",Image:maindetails,Status: true,Screen:'Dataset About'},{Title:"Data types & Categories",Image:maindetails,Status:true,Screen:'Data types and categories'},{Title:"Sharing & Outsourcing",Image:maindetails,Status:true,Screen:'Data Sharing Outsourcing'}, {Title:"Risk Mitigation",Image:maindetails,Status:true,Screen:'Data Risk Mitigation'}, {Title:"Access, Storage & Location",Image:maindetails,Status:true,Screen:'Data Access storage location'}, {Title:"Linked",Image:maindetails,Status:true, Screen:'Data Linked' }, {Title:"Retention, Archiving & Deletion",Image:maindetails,Status:true,Screen:'Data Retention Archiving'});

Navigate('Dataset About'))



Impactful Individual
Impactful Individual

Issue resolved. I removed all reference to the variable, saved and published the app then started again. Seems to be working now.

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.


New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (1,358)