Skip to main content

Notifications

Power Apps - Building Power Apps
Unanswered

Global variables appearing as "blank" when calling a Power Automate flow

Posted on by 3
I noticed that parameters that I'm populating with global variables are displaying as "blank".  
 
The only reason that I took notice is that in one environment the flow is running and in another it isn't.  When comparing them, I saw that the variables are blank in both.
 
So, in the code below the gblCaseNumber and gblStudentID variables are displaying as blank.  It's clearly not affecting anything in our development side, but I wasn't sure if that was normal behavior or not.
 
 
Set(
    varViewSpinner,
    true
);
UpdateContext({locSpinnerMessage:  "Printing page.  Please wait."});
UpdateContext({locPrintInfo:  GetreferralformdataintoHTML.Run(gblCaseNumber, gblStudentID,User().Email)});
Notify("Your requested report will be sent via email link", NotificationType.Information);
Set(
    varViewSpinner,
    false
);
 
Categories:
  • Mark Nanneman Profile Picture
    Mark Nanneman 329 on at
    Global variables appearing as "blank" when calling a Power Automate flow
    I'm assuming gblCaseNumber and gblStudentID these are either integer or string variables?

    Are you positive they're being set before the code you posted is run? 

    You could try adding a conditional to your code to warn you if either of the variables is blank.  You could also modify this to let you know if they don't have enough character length with a len function, or add more conditions to let you know which one is blank, etc.
     
    If(
    IsBlank(gblCaseNumber) Or IsBlank(gblStudentID),
    Notify("ALERT! gblCaseNumber or gblStudentID is blank!",NotificationType.Warning,2000),
     
    //your existing code here

    UpdateContext({locSpinnerMessage:  "Printing page.  Please wait."});
    UpdateContext({locPrintInfo:  GetreferralformdataintoHTML.Run(gblCaseNumber, gblStudentID,User().Email)});
    Notify("Your requested report will be sent via email link", NotificationType.Information)
    )


     

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

November 2024 Newsletter…

November 2024 Community Newsletter…

Community Update Oct 28…

Power Platform Community Update…

Tuesday Tip #7 Community Profile Tips…

Welcome to a brand new series, Tuesday Tips…

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 143,487

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,014

Leaderboard