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 / Issues Setting Global ...
Power Apps
Answered

Issues Setting Global Variable

(0) ShareShare
ReportReport
Posted on by 197

 

I had posted this issue previously and thought it was solved, but I am still having problems.

 

I have the following formula in the OnSelect of the next arrow of a gallery (FavProd😞

Select(Parent)
;If(FavProd.Selected.ChkF=Lower("false"),Set(VarChkF,false),Set(VarChkF,true))
;Navigate(Mixing,ScreenTransition.Fade)

I have tried setting FavProd.Selected.ChkF equal to:

  1.  false 
  2. "false"
  3. Lower("false") (as shown above. This was out of desperation to find a solution)

To help troubleshoot, I have two text labels - one with FavProd.Selected.ChkF, (results in false, which is correct) the other with VarChkF (results in true no matter what I have tried). 

 

Side note: I have a total of three occurances of setting VarChkF in the app. In addition to the one above, the other two occurances set VarChkF to false via (Set(VarChkF, false)).

 

Categories:
I have the same question (0)
  • mdevaney Profile Picture
    29,989 Moderator on at

    @AGS94 

    What does the table in your datasource look like?  Could you please share a screenshot?

  • AGS94 Profile Picture
    197 on at

     

    Here your go. Note that all formulas referecning the various column values are working as expected in the gallery's NextArrow1.OnSelect except the Chk"x"s (B thru F). 

     

    PA20191004.png

  • mdevaney Profile Picture
    29,989 Moderator on at
    deleted post
  • AGS94 Profile Picture
    197 on at

     

    Actually I only have one favorite saved thus far (shown in row 8 of the Excel worksheet pic) - the blank rows are not part of the actual Excel table that my app is referencing. So far the only rows in the table are rows 7 and 8 and those are the only rows the app is actually referencing.  As I save a favorite, a new row will be added to the Excel table and the app will then be able to reference that new row as well.

     

    The way I have it set up is when a new favorite is saved, ChkB through ChkF will always either be true or false. I have verified via a text label that FavProd.Selected.ChkF does indeed return false as is shown in Cell V8. Also verified, for example, that FavProd.Selected.ChkD returns true as shown in Cell T8.

     

    That said, if I do as you suggest, wouldn't the result always be true? My apologies if I am missing anything.

  • mdevaney Profile Picture
    29,989 Moderator on at
    @AGS94
    I deleted my latest post right before you posted back. I was looking at the column called ItmF instead of ChkF. That’s why my response did not make any sense.

    Please do two more things for me.
    1. Click on cell V8. Take a screenshot. Let me see what is in the Excel formula bar.
    2. Try the formula =TYPE(V8) on a blank cell in your spreadsheet. This will return a number that tells us the data type. Let me know the result.
  • mdevaney Profile Picture
    29,989 Moderator on at
    @ASG94
    You might also want to try replacing lower(“false”) with upper(“false”)
  • AGS94 Profile Picture
    197 on at

     

    Screenshots below. No formula in V8, just text (as shown). I clicked on the cell to get the Type and also keyed in TYPE(V8). Both returned "4" (shown in Cell C2)

     

    I also tried "Upper" and still the same results.

     

    This seams to be a simple formula. No idea why the trouble.  Thanks for sticking with me on this one.

     

    SHot2.pngshot1.png

  • Verified answer
    mdevaney Profile Picture
    29,989 Moderator on at
    @ASG94
    I was finally able to test on a computer. You want to compare against the value “False”. First letter is uppercase and the rest are lowercase.

    Select(Parent)
    ;If(FavProd.Selected.ChkF=“False",Set(VarChkF,false),Set(VarChkF,true))
    ;Navigate(Mixing,ScreenTransition.Fade)


    Please Accept as Solution if this post answered your question so others can find it more quickly. If you found this post helpful consider giving it a Thumbs Up.
  • AGS94 Profile Picture
    197 on at

     

    It worked! I owe you a virtual beer. Thanks for all the help!

     

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 721 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 320 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard