cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ashok2
Level: Powered On

Passing Variable from gallery to edit screen

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 }))

1 ACCEPTED SOLUTION

Accepted Solutions
Super User
Super User

Re: Passing Variable from gallery to edit screen

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}
);

View solution in original post

5 REPLIES 5
Super User
Super User

Re: Passing Variable from gallery to edit screen

@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
Level: Powered On

Re: Passing Variable from gallery to edit screen

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

Super User
Super User

Re: Passing Variable from gallery to edit screen

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}
);

View solution in original post

Ashok2
Level: Powered On

Re: Passing Variable from gallery to edit screen

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)

Highlighted
Ashok2
Level: Powered On

Re: Passing Variable from gallery to edit screen

its working as expected Cheers! for the solution

Helpful resources

Announcements
Better Together’ Contest Finalists Announced!

'Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

thirdimage

Power Apps Community User Group Member Badge

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

sixthImage

Join THE global Microsoft Power Platform event series

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

thirdimage

Microsoft Business Applications Virtual Launch

Join us for the Microsoft Business Applications Virtual Launch Event on Thursday, April 2, 2020, at 8:00 AM PST.

thirdimage

Community Summit North America

Innovate, Collaborate, Grow - The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors
Users online (9,184)