Skip to main content

Notifications

Power Apps - Building Power Apps
Answered

Unable to set global variable when it is not blank

Posted on by

Hi Folks,

 

I'm using a variable (defaultComboValue) to hold the default selection value for a combo box. It will be blank initially and later updated to text input value from another modal box. When the 'defaultComboValue' is blank it works as expected and text input value gets assigned to it - Set(defaultComboValue, TextInput_reltdSkl_1.Text);

 

Although, whenever it is not blank (holding the previous value assigned to it), it does not get set to a new text value using the same formula. It just gives blank even after using Set() function. 

 

Please reply if anyone has any thoughts on this. 

  • Verified answer
    rbn_nue Profile Picture
    rbn_nue on at
    Re: Unable to set global variable when it is not blank

    Hi @WarrenBelz ,

     

    Thank you for the response. Yes, the issue was with the set function as mentioned. Although I observed that for some reason the text input was going blank after a flow run and this caused the issue. I moved up the set function before the flow was called and the issue was resolved. 

     

    Cheers. 

  • WarrenBelz Profile Picture
    WarrenBelz 143,591 on at
    Re: Unable to set global variable when it is not blank

    Hi @rbn_nue ,

    The function

    Set(
     defaultComboValue, 
     TextInput_reltdSkl_1.Text
    );

    will set the variable to the content of the Text Box TextInput_reltdSkl_1 each time it is run, whether it is blank or not, over-writing whatever was there before. Are you saying you are having issues with this?

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,591

#2
RandyHayes Profile Picture

RandyHayes 76,308

#3
Pstork1 Profile Picture

Pstork1 64,090

Leaderboard