web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Boolean Filter not wor...
Power Apps
Unanswered

Boolean Filter not working on offline collection

(0) ShareShare
ReportReport
Posted on by

Hi,

 

I am storing online entity data in collection for offline use using SaveData and using it by using LoadData function. When I use any Boolean filter it gives me 0 records, but for other filters like status (Option Set), Lookup it is working as expected. Same filter works on same collection when I am online or online till first screen as on start online data is getting collected in collection. Also checked following thing:

1. Row counts for offline data is matching

2. Changing filter syntax like using = true, =Boolean(1) etc.

//Saving data on app start.

ClearCollect(
colAllMyItems,
My Items'
);

SaveData(colAllMyItems, "colAllMyItems" );

 

//Loading data while offline

LoadData(colAllMyItems, "colAllMyItems", true);

 

//Filtering Collection offline

ClearCollect(
  colAllMyItems,
  Filter(
  colAllMyItems,
  Contact.Contact = gblDeceased.Contact,
  Returned = false,
  'To be returned?'
  )
);

 

Could anyone help me with this?

Categories:
I have the same question (0)
  • v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @MayurHande986 ,

    You need to filter based on your original data source:

    ClearCollect(
      colAllMyItems,
      Filter(
      'My Items',
      Contact.Contact = gblDeceased.Contact,
      Returned = false,
      'To be returned?'
      )
    );

     

     

  • HandeMV Profile Picture
    on at

    Hi,

     

    colAllMyItems is offline collection, if I use 'My Items' it checks for online datasource and show error "Failed to load datasource". I want to filter collection to smaller 1 based on boolean fields.

  • v-qiaqi@microsoft.com Profile Picture
    on at

    Hi @MayurHande986,

    Okay, I get that.

    It only fail to filter based on boolean value, right?

    As I know, there is only a special Choice column named Yes/No in Dataverse table, if so, modify as below:

    ClearCollect(
     colAllMyItems,
     Filter(
     colAllMyItems,
     Contact.Contact = gblDeceased.Contact,
     Returned=LookUp(Choices('My Items'.Returned),Text(Value)="No").Value)
     )
    );

     

  • HandeMV Profile Picture
    on at

    Hi,

     

    Still not getting result. 
    Issue is when I create collection from online source on app load and even if I go offline, boolean filters are working on collection. But issue happening with collection which I am storing it using SaveData/LoadData method. 
    Basically when user is online, i am storing latest data in collection by SaveData and for Oflline loading same collection from memory by LoadData. Issue is happening for this collection.

    Is any structural change happen while SaveData/LoadData? 
    Also, Other filters like Lookup, Option Set etc. works properly. Issue is happening only for boolean. Total Row counts of collection are also matching with online data.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 765 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 272

Last 30 days Overall leaderboard