cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
martyb
New Member

Context Variables not accessible

Hi,


I'm having trouble with some context variables that don't appear on a form when first accessed. When I return to the previous screen and click on the button to access the form again, all the variables are accessible. The missing variables are drop down values that are passed as context variables in the navigate function. It works fine when testing in powerapps studio but not when accessing the published version.

 

First time form is accessed

first access.png 

 

Second time form is accessed

second access.png

 

I've tried various methods to get around this including setting the missing data as global variables but they are not accessible either. The global variables are in the bottom left corner. I've even tried to set context variables OnVisible from the global variables (which to exist) for the form screen but they don't work either.

 

Global and Context Variables set OnSelect 

 

//Set global values for drop downs
Set(OverallStatusValue, DataCardValue3_4.Selected);
Set(ScopeStatusValue, DataCardValue4_4.Selected);
Set(RiskStatusValue, DataCardValue6_4.Selected);
Set(BudgetStatusValue, DataCardValue5_4.Selected);
Set(ResourceStatusValue, DataCardValue7_4.Selected);
Set(CustomerSatisfactionStatusValue, DataCardValue36_6.Selected);
Set(ScheduleStatusValue, DataCardValue35_6.Selected);

NewForm(OverviewSectionEdit_1);
Navigate(
    StatusDetailCopy,
    ScreenTransition.Fade,
    {
        CopiedOverAllStatus: DataCardValue3_4.Selected,
        CopiedScopeStatus: DataCardValue4_4.Selected,
        CopiedRiskStatus: DataCardValue6_4.Selected,
        CopiedBudgetStatus: DataCardValue5_4.Selected,
        CopiedResourceStatus: DataCardValue7_4.Selected,
        CopiedCustomerSatisfactionStatus: DataCardValue36_6.Selected,
        CopiedScheduledStatus: DataCardValue35_6.Selected,
        IsCopiedItem: true,
        WeekSelected: WeekSelected,
        ProjectVariable: ProjectVariable,
        WebLink: WebLink,
        CurrentWeek: CurrentWeek,
        WeekRangeParam: WeekRangeParam,
        UpdateWeek: UpdateWeek,
        CustomerVariable: CustomerVariable,
        CopiedStatusSummary: DataCardValue37_6.Text,
        CopiedOverAllStatusComments: DataCardValue11_4.Text,
        CopiedScopeStatusComments: DataCardValue12_4.Text,
        CopiedScheduledStatusComments: DataCardValue13_4.Text,
        CopiedBudgetStatusComments: DataCardValue14_4.Text,
        CopiedRiskStatusComments: DataCardValue15_4.Text,
        CopiedResourceStatusComments: DataCardValue16_4.Text,
        CopiedCustomerSatisfactionStausComments: DataCardValue17_4.Text,
        CopiedActLastWeek: DataCardValue41_6.Text,
        CopiedActMissed: DataCardValue1.Text,
        CopiedActThisWeek: DataCardValue42_6.Text,
        CopiedEACPSA: Radio1_6.Selected
    }
)

 

 

Context Variables set OnVisible on StatusDetailCopy screen that contains form

UpdateContext({ScopeTestValue: ScopeStatusValue.Value});
UpdateContext({OverallTestValue: OverallStatusValue.Value});
UpdateContext({BudgetTestValue: BudgetStatusValue.Value});
UpdateContext({ResourceTestValue: ResourceStatusValue.Value});
UpdateContext({CustomerSatisfactionTestValue: CustomerSatisfactionStatusValue.Value});
UpdateContext({RiskTestValue: RiskStatusValue.Value});
UpdateContext({ScheduleTestValue: ScheduleStatusValue.Value})

 I've checked to confirm the global variables are set and they are. 

 

Screenshot 2019-02-06 at 11.48.17.png

 

The context variables also exist. 

 

Screenshot 2019-02-06 at 11.48.17.png

 

I've run out of ideas to ensure the variables are present when first accessing the form. Any suggestions or advice is welcome!

Thanks,
Marty

0 REPLIES 0

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza Winner Announcement

Please join us on Wednesday, July 21st at 8a PDT. We will be announcing the Winners of the Demo Extravaganza!

V3_PVA CAmpaign Carousel.png

Community Challenge - Giveaways!

Participate in the Power Virtual Agents Community Challenge

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

Top Solution Authors
Top Kudoed Authors
Users online (2,620)