cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
HYU
Advocate I
Advocate I

Use string variable to store the Site Address and List Name

Is it possible to store the Site Address url and List Name in string variables so I don't have to hard code these values in my Flow?

11 REPLIES 11
v-micsh-msft
Community Support
Community Support

Hi  @HYU,

 

Yes, it is possible.

But it is recommended to take use of Array variable to store the Site Address and the List name seperately:

38.PNG

 

Regards,

Michael

Community Support Team _ Michael Shao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I can setup the variable array fine but it doesn't seem to allow me to use it during design-time. When I tried to use the variable to retrieve the Site Address and List Name during "update item" action (I want to update the value of a column on the list), it errors out, "Cannot evaluate the parameter 'dataset' at design-time; it is empty or has a runtime expression". The workaround would be hard code the Site Address and List Name every time I need to "update item", since I need to update the list numberous times during the whole flow, using variables would be nice. Aslo when I am ready to export this flow to another site, I don't need to modify the flow to change the Site Address numberous times.

zsuzsannaf
Regular Visitor

Do you have a solution for that? I have the same problem.

Unfortunately I don't have the perfect solution as I wanted, but I have a workaround. Export the flow to package (.zip), open the zip file and edit the definition.json file, specify the new site addrss url, the new list name etc. then import back. I used 7-Zip to open and it opens the flow definition file in Notepad for me to edit.

zsuzsannaf
Regular Visitor

Thank you very much!

Found any other viable way to do this? I have a flow that runs on main site and needs to move files to different sites depending on variables. But I can't update properties since I get the same error you have.

GabrielStJohn
Microsoft
Microsoft

Hello, @HYU!

Thank you for posting a reply to a topic on the Microsoft Flow Community! It appears that the users who you have been engaging in this thread with are now awaiting your reply! Please follow-up on this thread ASAP.

 

Thank You!

-Gabriel

Microsoft Flow Community Manager

- Gabriel
Community Manager
Power Automate | Power Virtual Agents
Super User Program Manager



Unfortunately, I didn't find.

Regards,

Zsuzsannaf

Sorry, I haven't found any alternative way.

IoaPan
Frequent Visitor

Two years after this post, has Microsoft provided any solution for this?

Hi,

I'm using the workaround solution and didn't have time to check and rewrite my flows. So, unfortunately, I don't know now. But I will check it soon.

Helpful resources

Announcements
MPA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

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.

PowerPlatform 768x460.png

Microsoft Learn

Check out our new Discover Your Career Path blog post series and get all the details.

Top Solution Authors
Users online (1,046)