Skip to main content
Community site session details

Community site session details

Session Id :
Power Automate - Building Flows
Answered

Issue with variable and switch function for DocuSign automation

(0) ShareShare
ReportReport
Posted on by

Hello,

 

I have tried to find a way to auto-archive completed envelopes from various units, from DocuSign into specific folders in SharePoint. I have experimented a lot and hopefully, I may have found a way now. However, I am stuck since I cannot establish the correct data to be used with the switch function.

 

Here is what I have done so far:

When an envelope is completed I find the unit number by using Compose 

alessiom2003_3-1662979085479.png

 

Then I have copied a formula from one of my colleagues to be used as variable in the switch function.

alessiom2003_4-1662979189369.png

I have tried to change it to outputs('Compose 2'), but I get an error from Power Automate.

alessiom2003_5-1662979682089.png

When I run the flow with the initial variable: 

int('Compose 2')?['Unit Number']
The flow fails as per below (though, it has recognised the Unit Number successfully.

 

alessiom2003_0-1662978927658.png

alessiom2003_1-1662978968880.png

alessiom2003_2-1662978988432.png

Any idea what I am doing wrong? 

 

Thank you in advance for your help.

Ale

  • Community Power Platform Member Profile Picture
    on at
    Re: Issue with variable and switch function for DocuSign automation

    It works!!!!! 

    Thank you so much!!! Really appreciate your help. You saved me! 

    Ale 

  • Verified answer
    v-liwei-msft Profile Picture
    on at
    Re: Issue with variable and switch function for DocuSign automation

    Hi @Anonymous 

     

    Please modify outputs('Compose 2') to outputs('Compose_2').

     

    Best Regards,

    Levi

  • v-liwei-msft Profile Picture
    on at
    Re: Issue with variable and switch function for DocuSign automation

    Hi @Anonymous ,

     

    Could you please provide me with a clearer screenshot of the error report?

     

    Best Regards,

    Levi

  • Community Power Platform Member Profile Picture
    on at
    Re: Issue with variable and switch function for DocuSign automation

    Hi Levi,

     

    Thank you for your quick reply. I have tried, but it still gives me an error message.

     

    alessiom2003_1-1663058037896.png

     

    alessiom2003_2-1663058077068.png

    Any idea what I am doing wrong? 

    Thank you

    Ale

     

     

  • v-liwei-msft Profile Picture
    on at
    Re: Issue with variable and switch function for DocuSign automation

    Hi @Anonymous 

     

    You cannot call the current item of a loop outside the loop.

    You should put the switch in the apply to each.

    If you need to use the int function, modify the formula to:

    int(outputs('Compose 2'))

     

    Best Regards,

    Levi

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

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Announcing the Engage with the Community forum!

This forum is your space to connect, share, and grow!

Leaderboard > Power Automate

#1
Michael E. Gernaey Profile Picture

Michael E. Gernaey 497 Super User 2025 Season 1

#2
David_MA Profile Picture

David_MA 436 Super User 2025 Season 1

#3
Riyaz_riz11 Profile Picture

Riyaz_riz11 244 Super User 2025 Season 1