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 / Canvas app behaves dif...
Power Apps
Unanswered

Canvas app behaves differently in different browsers and mobile device

(0) ShareShare
ReportReport
Posted on by 70

Hello,

im looking for some explanation, why application behaves differently in Mobile app or other browsers. 

 

I have an application which is using a calendar. Weekends in my case is not selectable on purpose. In Chrome browser it works as expected, however in Edge and mobile devices its selectable. Also in some mobile devices, some filters over galleries is working and in some other devices not. 

Does anyone else has similar experience and more important explanation of such behavior? Im ready to provide more information if needed. 

Thank you.

 

Regards,
Jakub

Categories:
  • Scott_Parker Profile Picture
    1,090 on at

    I haven't seen this. Are you using Classic or Modern controls?

  • Krentor Profile Picture
    70 on at

    For filtering im using combobox from Teams dataverse. For calendar im not sure but i think that i do not use any modern control for it.

    in calendar gallery i have a Title control for each day including this part of code:
    Set(_dateSelected, DateAdd(_firstDayInView, ThisItem.Value, TimeUnit.Days));
    Set(varDay,Text(_dateSelected,"ddd"));
    If(_dateSelected in colSvatky.Datum , false, varDay = "Sat", false, varDay = "Sun", false,

  • Scott_Parker Profile Picture
    1,090 on at

    Okay, then probably unrelated to classic vs. modern controls.

     

    How are you restricting the selection of Weekends? Which controls and code? Maybe there is some race condition in using Set(). This could potentially give different results in different browsers.

  • Krentor Profile Picture
    70 on at

    Control which i use for selection is Text label. Whole code which i have in OnSelect property is:


    Set(_dateSelected, DateAdd(_firstDayInView, ThisItem.Value, TimeUnit.Days));
    Set(varDay,Text(_dateSelected,"ddd"));
    If(_dateSelected in colSvatky.Datum , false, varDay = "Sat", false, varDay = "Sun", false,

     

    If(
    CountRows(
    Filter(
    testik,
    Datum = _dateSelected
    )
    ) > 0,
    Remove(
    testik,
    First(
    Filter(
    testik,
    Datum = _dateSelected
    )
    )
    ),
    Collect(
    testik,
    { Datum: _dateSelected, ID: CountRows(testik) + 1, HodnotaDne : 1 }
    )
    ));
    If(!IsEmpty(testik), Set(varShrnutiVis, true),Set(varShrnutiVis,false));
    If(!IsEmpty(testik), Set(varDefaultVis, false), Set(varDefaultVis,true));
    Set(varZaznamDetail, false);

    Set(varFirstRecord, First(Sort(testik,Datum,SortOrder.Ascending)));
    Set(varLastRecord, Last(Sort(testik,Datum,SortOrder.Ascending)));
    If(VarStartTimer = true, Reset(Timer) && Set(VarStartTimer, false), false);
    If(VarStartTimer2 = true, Reset(Timer_1) && Set(VarStartTimer2, false), false);

     

    Krentor_0-1690541850847.png

     

  • Scott_Parker Profile Picture
    1,090 on at

    Looks like an issue with Set(). Use Set() when setting values that will be used in other controls, don't use it in situations like this where you are immediately using the variable in a subsequent line of code. UpdateContext() doesn't have this problem in my experience. If you use UpdateContext() instead of Set() it should work consistently:

    UpdateContext({_dateSelected: DateAdd(_firstDayInView, ThisItem.Value, TimeUnit.Days)});
    UpdateContext({varData: Text(_dateSelected,"ddd")});

    What I suspect is happening is that your first Set() isn't evaluating in time, so your If() statement always sees varDay as blank, never as "Sat" or "Sun".

     

     

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 243 Super User 2026 Season 2

#2
WarrenBelz Profile Picture

WarrenBelz 204 Most Valuable Professional

#3
Mohsin Ali Profile Picture

Mohsin Ali 122

Last 30 days Overall leaderboard