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 / Passing Variable from ...
Power Apps
Answered

Passing Variable from gallery to edit screen

(0) ShareShare
ReportReport
Posted on by 428

I am trying to pass var from gallery to edit screen so as per status i can show hide certain columns in edit screen but my variable does not pass everytime i go to edit screen it give me false boolean value even if its true i am using updatecontext if i use SET it will remain true 

 

ClearCollect(Collection1,Coll1);ClearCollect(Collection2,Coll2);Navigate(CoverPage,ScreenTransition.Fade,{SelectedID:Gallery_1.Selected.'ID'});If((Status.Value="Approved"&&'Status2.Value'="Competed"),UpdateContext({State: true }))

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

    @Ashok2 

    Could it be because you have misspelled "Completed"?  It looks like you have "Competed" instead.

     

    ---
    Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

  • Ashok2 Profile Picture
    428 on at

    it is typo here but it is "Completed" in powerapp solution , still no luck

  • Verified answer
    timl Profile Picture
    37,262 Super User 2026 Season 1 on at

    Hi @Ashok2 

    Here are some things I would try.

    State is a PowerApps keyword (it's a built in enumeration), so I'd recommend that you use a unique name like varState.

    In terms of the order of your function, you would need to set the variable before calling Navigate. You would also need to pass varState as the 3rd argument in your call to Navigate.

    I would give this a try to see if it works better for you.

    ClearCollect(Collection1,Coll1);ClearCollect(Collection2,Coll2);
    If((Status.Value="Approved"&&'Status2.Value'="Competed"),
     UpdateContext({varState: true })
    );
    Navigate(CoverPage,ScreenTransition.Fade,
     {SelectedID:Gallery_1.Selected.'ID', varState: varState}
    );
    
  • Ashok2 Profile Picture
    428 on at

    I tried this but in edit form if tried to set below variable on visibilty it give invalid argument type at "="

    Visible:If(varState=true,true,false)

  • Ashok2 Profile Picture
    428 on at

    its working as expected Cheers! for the solution

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

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 325 Most Valuable Professional

#2
11manish Profile Picture

11manish 165

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 88 Super User 2026 Season 1

Last 30 days Overall leaderboard