web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Automate / Can't set string using...
Power Automate
Unanswered

Can't set string using Set Var

(0) ShareShare
ReportReport
Posted on by 33

This may be something simple, but I can't update a string var using "Set Var".

 

First I initialized the var:

1.png

 

Then I try to set the var:

2.png

 

And I get a non-descriptive error:

error.png

 

I also tried wrapping my string in "double" or 'single' quotes. Did not help.

Categories:
I have the same question (0)
  • Verified answer
    ManishSolanki Profile Picture
    15,091 Super User 2025 Season 2 on at

    Hi @marmot777 

     

    Pls try replacing input of switch action with an expression mentioned below:

    ManishSolanki_0-1714584566738.png

    Below expression needs to be added in the expression box as highlighted in the above screenshot:

    int(variables('Delta Due Date Text'))

     

     

     

     

    If this helps & solves your problem, please remember to give a 👍 and accept my solution as it will help others in the future.

     

  • marmot777 Profile Picture
    33 on at

    Thanks Manish for taking a look. When I entered the expression in the Switch function, I got the following error upon running.

    3.png

    I felt the switch was working before. I observed the flow running through Case 2 or Case 3 as expected (and then erroring).

  • marmot777 Profile Picture
    33 on at

    This example shows it successfully switching on a value of 7, and then erroring.

     

    4.png

  • marmot777 Profile Picture
    33 on at

    After looking closer, your solution works. I just had to change

    int(variables('Delta Due Date Text'))

    to 

    int(variables('Delta Due Date'))

     in order to reference the right variable.

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 538 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 405 Moderator

#3
abm abm Profile Picture

abm abm 252 Most Valuable Professional

Last 30 days Overall leaderboard