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 Apps / Variables not Recognized
Power Apps
Unanswered

Variables not Recognized

(0) ShareShare
ReportReport
Posted on by 30

I have 4 lines of code that should be simple:

 

Set(str1, "string1");

Set(str2, "string2");

Set(str3, "string3");

Set (valRet,pauto.run(str1,str2,str3));

 

The Automate flow trigger is powerapps v2 expecting 3 strings and they are named the same in both PA and Automate.

The error I can't figure out: the run function says "Invalid Arguments/str1 isn't recognized". Mousing over the other two variables gives the same error to each of them too.

WTF

Categories:
I have the same question (0)
  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @hcharris ,

     

    Unffortunately I was unable to replicate the issue.

     

    Some things you may want to check:

     

    - Any hidden parts of a formula in the formula bar

    - remove the space between Set and (

    - replace run with Run

  • hcharris Profile Picture
    30 on at

    Thank you for replying. 

     

    In the real code Run was already capitalized. Removing the space did not change anything.

     

    The flow was tested and it ran successfully when I entered the three strings. 

     

    When I click on the variable name, it lights up in both the Run command and the Set command above it.

     

    I've tried to retype the names and change them with no joy.

  • hcharris Profile Picture
    30 on at

    A little more information: the variable names are not showing up in the list of variables. I do have quite a few variables in the app so I wondered if there might be a limit on the number of variables but I could not find anything that confirmed that. It seems that the names are not being recognized as variables.

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    HI @hcharris ,

     

    When you remove the last line of the formula, do the variables populate correctly?

  • hcharris Profile Picture
    30 on at

    No. I removed the line with Run and everything after it and none of the variable names are being added to the list of variables. 

    I have tried a lot of things (e.g. retyping the lines, changing the names, etc) but no joy yet.

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @hcharris ,

     

    Have you considered using references instead of variables? You mentioned you have a large number of variables in your app, so I ran into this when searching for a clue: https://powerusers.microsoft.com/t5/Building-Power-Apps/Limitations-Variables/m-p/475445/highlight/true#M142897

  • hcharris Profile Picture
    30 on at

    This app has several screens where I collect data and then pass that data to a flow for processing. The total number of variables is approximately 12. Most data is not needed on other screens but it is needed when calling the main flow on the last screen.  The flow returns the results to the app. Everything was working correctly until I tried to add second flow that tests for the existence of a folder with only 3 of the variables and returns a true or false to the app. A true return will terminate the app with a notification to the user.

     

    Examining the variables list, I see a number of variables that no longer exist. Names that I changed during the course of development. In one case, I had a variable name that stopped working and I renamed it and that fixed the issue. The old name still exists in the list. Is there a way to refresh that list?

     

    Thanks again for the reply. I saw conservation you referenced before I posted but did not test for a limit. Over the weekend I worked on a strategy (in/out of my head).  This morning, I am planning to create a test app and copy each screen over one at a time in an effort to rebuild the variables list. 

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    Hi @hcharris ,

     

    How are you coming along? I did notice some instability lately in Power Apps when it came to using variables. Usually my errors disappeared after closing Power Apps studio and then re-opening it.

  • hcharris Profile Picture
    30 on at

    Thanks for following up. No joy here.

     

    Some progress but it seems like a moving target. 

     

    I'm trying to execute the flow like this: Set(varRetVal,authProcessing.Run(list of variables))

    I am getting variables in the variables list but varRetVal is showing up as a boolean. In the flow, I'm trying to return 5 string values.

    I've tried changing the variable name but the new name also shows up as a boolean.

    I've tried to remove the flow and re-add it but that hasn't helped.

    I've replaced the trigger in the flow and no joy there either.

    I'm really at a loss.

     

     

  • BCBuizer Profile Picture
    22,505 Super User 2025 Season 2 on at

    @hcharris ,

     

    So it seems the original issue where some variable names were not recognised has been resolved?

     

    As for varRetVal not getting the expected values, can you please share the part of the flow that is supposed to return these values?

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 Apps

#1
WarrenBelz Profile Picture

WarrenBelz 739 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 343 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard