cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Super User
Super User

BUG: iPhone and browser show different values for Compliance Report

I'm noticing that the iPhone version and browser version of my app show different values for a compliance report. It looks like a screen rendering issue (incomplete rendering) because if I navigate away then back to the compliance screen, the numbers are correct. 

 

Due to the nature of the information shown, I can't have it partially render! Please consider this a bug report and let me know how I can help. 

 

Browser session id: d30b757c-bbd6-43d2-88a9-54a6454d6525
PowerApps 3.18071.36

 

iPnone session id: b8a14ac9-4ccf-4193-8a68-fad0ece3ecaa

PowerApps 3.18071.36

 

Browser image: 

discrep1.png

 

iPhone image showing different values: 

discrep3.png

 

iPhone image after navigation away, then back to compliance screen: 

discrep2.png

1 REPLY 1
Super User
Super User

Re: BUG: iPhone and browser show different values for Compliance Report

The code for this is challenging to explain, but i'll try here: 

 

OnVisible property of Screen1, three vars are set to tell the app what year, 1/2 of year (first or second half of year) and month it is:

"Sets a variable for current year. Used for the browse screen to determine compliance";

Set(thisYear,Text(Today(),"[$-en-US]yyyy"));

"Sets a variable for dividing year into two halves. Used for the browse screen to determine compliance";

If(Text(Today(),"[$-en-US]mm")="01" ||
    Text(Today(),"[$-en-US]mm")="02" ||
    Text(Today(),"[$-en-US]mm")="03" ||
    Text(Today(),"[$-en-US]mm")="04" ||
    Text(Today(),"[$-en-US]mm")="05" ||
    Text(Today(),"[$-en-US]mm")="06",
    Set(thisHalf,"1"),Set(thisHalf,"2")
    );

"Sets a variable for month. Used for the browse screen to determine compliance";

Set(thisMonth,Text(Today(),"[$-en-US]mm"))

On the ComplianceScreen, user selects a value from a Dropdown control. The OnChange property of the Dropdown control starts a timer and shows a "spinner.gif": 

//Timer is used to start the spinner duration//

UpdateContext({timerStart: true});
UpdateContext({spinner: true})

Also on the ComplianceScreen is a Gallery control with Items property set to look at the Dropdown selected item, filter a Sharepoint list, and return results.

Distinct(
    SortByColumns(
        Filter(
            SharepointList,
            columnName = Dropdown.Selected.Value),
    "anotherColumnName"),
anotherColumnName)

The timer runs for 2.5 seconds then its OnTimerEnd property sets the spinner.gif Visible property to false and resets the Timer control:

UpdateContext({spinner: false});
UpdateContext({timerStart: false});
UpdateContext({timerStop: true});
UpdateContext({timerReset: true});
UpdateContext({timerReset: false})

Finally, the actual Label that is showing the discrepency looks at a Sharepoint list of evaluations that have been submitted, and compares it to another Sharepoint list of one-to-many relationships (one supervisor, many direct reports) to determine number of evaluations required. 

//Determine how many evals have been submitted this year and month//
CountIf(
    resultsTable,
    supervisor = ThisItem.Result,
    year1=thisYear,
    month1=thisMonth)

    &

//Determine how many evals supervisor is responsible for completing//
    If(
        CountRows(
            Distinct(
                Filter(
                    oneToManyTable,
                    supervisor=ThisItem.Result),
            directReports))
            =1,"/1",

        CountRows(
            Distinct(
                Filter(
                    oneToManyTable,
                    supervisor=ThisItem.Result),
            directReports))
            =2,"/2",
        "/3")

Hope you can decipher what is happening above.

Helpful resources

Announcements
thirdimage

Power Automate Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

fifthimage

Microsoft Learn

Learn how to build the business apps that you need.

Top Kudoed Authors (Last 30 Days)
Users online (5,407)