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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / filtering with a textc...
Power Apps
Suggested Answer

filtering with a textcanvas

(1) ShareShare
ReportReport
Posted on by
 tso i have a textcanvas with this value in my gallery: 
If(
    IsBlank(LookUp(
        BoBCoCheckupDetails;
        CheckupHeaderCode.CheckupHeaderCode = varCheckupHeaderCode &&
        ControleDetailCode.ControleDetailCode = ThisItem.ControleDetailCode;
        'Modified On'
    ));
    DateTimeValue("1900-01-01");
    LookUp(
        BoBCoCheckupDetails;
        CheckupHeaderCode.CheckupHeaderCode = varCheckupHeaderCode &&
        ControleDetailCode.ControleDetailCode = ThisItem.ControleDetailCode;
        'Modified On'
    )
) the modified on gets updated when i press the verwerkOk button that has this code (it also sits in my gallery) 
Patch(
    BoBCoCheckupDetails;
    Defaults(BoBCoCheckupDetails);
    {
        CheckupDetailCode:  varObjectNoControle&"-"&Text(Now(); "yyyymmdd-hhmmss")&"-"&varGebruiker&"-"&ThisItem.ControleDetailCode;
        ControleItemDescription: LookUp(BoBCoControleItems; ControleItemCode = ThisItem.ControleItemCode.ControleItemCode;ControleItemDescriptionNL);
        CheckupResult: "Ok";
        CheckupRemarks: "Veld nog te voorzien";
        CheckupHeaderCode: LookUp(BoBCoCheckupHeaders; CheckupHeaderCode = varCheckupHeaderCode);
        ControleDetailCode: LookUp(BoBCoControleDetails; ControleDetailCode= ThisItem.ControleDetailCode)
    }
);;
Set(
    varControleVisibility;
    false
);;
Reset(Gallery7_2) now i want to filter my items of the gallery so that the items with my newest date gets on the bottom of the gallery. 
Gallery4_2.Selected.BoBCoControleDetails (this is what i have now in my gallery) 
 
now i thought i could just filter on the textcanvas but it can't because i get a circular reference
 
can somebody help me please!!
Categories:
  • Suggested answer
    SaiRT14 Profile Picture
    1,992 Super User 2025 Season 1 on at
     
    I think it is a circular reference issue: 
    Create the Collection: Add this code to your screen's OnVisible property or within the OnStart property of the app
    ClearCollect(
        colCheckupDetails,
        AddColumns(
            BoBCoCheckupDetails,
            "ModifiedOnComputed",
            If(
                IsBlank(
                    LookUp(
                        BoBCoCheckupDetails,
                        CheckupHeaderCode.CheckupHeaderCode = varCheckupHeaderCode &&
                        ControleDetailCode.ControleDetailCode = ControleDetailCode,
                        'Modified On'
                    )
                ),
                DateTimeValue("1900-01-01"),
                LookUp(
                    BoBCoCheckupDetails,
                    CheckupHeaderCode.CheckupHeaderCode = varCheckupHeaderCode &&
                    ControleDetailCode.ControleDetailCode = ControleDetailCode,
                    'Modified On'
                )
            )
        )
    );
     
     
    pls try and let me know if you have issues.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 432 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 347

#3
WarrenBelz Profile Picture

WarrenBelz 254 Most Valuable Professional

Last 30 days Overall leaderboard