cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JDofficial
Frequent Visitor

Using Functions in Variables within Power Automate Desktop

Cheers,

 

I tried to dig up the internet without success for finding a solution to use (for example) text functions when assigning value to a variable.


At a 'set variable' action I have set: NewVar to 210121 (the date of the query). In the other stage I would like to set variable YearVar to something like "20" & Left(%NewVar%, 2). Unfortunately nothing like that seems to be working.

Is there a way to use functions within variables or inputs to actions in any fashion - apart from using the 'Get subtext' action? In a software where you can scrape whole tables from the web with css identification in a few clicks, I think it would be really lame to use a separate action for a simple text function.

 

PLEASE DO NOT COME UP WITH SOMETHING LIKE WHY I NEED THAT - bc I could use another tools or the whole thing is superfluous in the process, as I am still trying to find out what this software can do - because of the somewhat inappropriate documentation.

 

Thanks,
JD

1 ACCEPTED SOLUTION

Accepted Solutions

Hi @JDofficial ,

I totally agree with your view that if in a sophisticated programming language some logic/code can be incorporated with just 1 line of code, why it would not be possible to have it in another language/platform? As of now, in PAD it is not possible to call those ".net framework" based functions straight away. You can call it serious limitation/restriction.

 

An alternative to this can be activites like "Run VB Script" or "Run Python script", in which you can writedown really detailed piece of code in just 1 instruction.

 

Also in my opinion, having some restrictions in platform could be well though off by the developers of it. In case of PAD, I have observed one thing is that the chances error/failure of a piece of automation are significantly less compared to any other platform. Because your code is made up from only those activity allowed by software and not from user preffered library dependent functions/instructions. The more free environment it is the less error proofing done at design time or more error checking has to be done at run time. and at run time the chances of error/exception increases lot so the chances of execution break up in run time are higher.

 

I have been using other industry leader RPA tools since now almost 3 years. and one thing i have experienced is that you need to invest lot of time behind checking and testing of automation before deploymebt if your developmenet environment is so-called Open. in case of PAD this time could be significantly lower.

 

This doesn't mean that I don't want any changes or addition in platform. There are lot of improvement scope for it, which are being mentioned on the forum like this.

 

So the bottom line could be just find a way to actualize your code within the restriction of the software platform and then compare one platform with another platform in terms of performance.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Hi @JDofficial ,

 

* Convert the number to text

* Use "Get Subtext" action to get subtext

* Then  add 20 infront of the subtext output

 

Hope this helps:)

 

 

sakula1996_0-1611339910952.png

 

sakula1996_1-1611339936196.png

sakula1996_2-1611339956206.png

 

sakula1996_3-1611339970200.png

 

 

Thank you @Anonymous, but my question was:

"Is there a way to use functions within variables or inputs to actions in any fashion - apart from using the 'Get subtext' action?"

 

Since you used it, I cannot accept it as a solution. I am completely aware of the opportunity of doing this (see my original post), but I find pretty awkward to do something similar in 3 actions instead of one line of code.

Hi @JDofficial ,

I totally agree with your view that if in a sophisticated programming language some logic/code can be incorporated with just 1 line of code, why it would not be possible to have it in another language/platform? As of now, in PAD it is not possible to call those ".net framework" based functions straight away. You can call it serious limitation/restriction.

 

An alternative to this can be activites like "Run VB Script" or "Run Python script", in which you can writedown really detailed piece of code in just 1 instruction.

 

Also in my opinion, having some restrictions in platform could be well though off by the developers of it. In case of PAD, I have observed one thing is that the chances error/failure of a piece of automation are significantly less compared to any other platform. Because your code is made up from only those activity allowed by software and not from user preffered library dependent functions/instructions. The more free environment it is the less error proofing done at design time or more error checking has to be done at run time. and at run time the chances of error/exception increases lot so the chances of execution break up in run time are higher.

 

I have been using other industry leader RPA tools since now almost 3 years. and one thing i have experienced is that you need to invest lot of time behind checking and testing of automation before deploymebt if your developmenet environment is so-called Open. in case of PAD this time could be significantly lower.

 

This doesn't mean that I don't want any changes or addition in platform. There are lot of improvement scope for it, which are being mentioned on the forum like this.

 

So the bottom line could be just find a way to actualize your code within the restriction of the software platform and then compare one platform with another platform in terms of performance.

Hi @Rkmatieda,

 

Thank you for the ideas you have given - using Python or VBScript as an alternative. I find it is still not ideal, but better off having tons of actions that cannot be renamed and be put in context especially when automating more complex processes. As seemingly this is the best choice in the current framework I give you the credit for that.

 

Your reasoning, which I think is pretty close to the developers' official one, is fair and for now we have to live with it - I really hope only for now - as future development is going to iron out these flaws.

 

To reiterate: I also do think that PAD has really powerful tools like extract data from web page - but it is really dissonant that getting a subtext of a string is equally weighted as a process step to scraping a whole table. On the reliability part I find its behavior weird sometimes (like sometimes it does not run properly if an instance of a browser is not open yet) - but that is an other subject. In theory .NET is also developed by Microsoft, so I see no major challenge on the reliability here - the knowledge is within the organization. Strategically I deem there is a complete different story.

 

Cheers,

JD

wszreiber
Regular Visitor

with date is method with math

for example, if u wanna cut day number from 210121

when day is last digits: (210121 - day from date) / 100   = 2101

 

/vviesio

 

Helpful resources

Announcements

Community will be READ ONLY July 16th, 5p PDT -July 22nd

Dear Community Members,   We'd like to let you know of an upcoming change to the community platform: starting July 16th, the platform will transition to a READ ONLY mode until July 22nd.   During this period, members will not be able to Kudo, Comment, or Reply to any posts.   On July 22nd, please be on the lookout for a message sent to the email address registered on your community profile. This email is crucial as it will contain your unique code and link to register for the new platform encompassing all of the communities.   What to Expect in the New Community: A more unified experience where all products, including Power Apps, Power Automate, Copilot Studio, and Power Pages, will be accessible from one community.Community Blogs that you can syndicate and link to for automatic updates. We appreciate your understanding and cooperation during this transition. Stay tuned for the exciting new features and a seamless community experience ahead!

Summer of Solutions | Week 4 Results | Winners will be posted on July 24th

We are excited to announce the Summer of Solutions Challenge!    This challenge is kicking off on Monday, June 17th and will run for (4) weeks.  The challenge is open to all Power Platform (Power Apps, Power Automate, Copilot Studio & Power Pages) community members. We invite you to participate in a quest to provide solutions to as many questions as you can. Answers can be provided in all the communities.    Entry Period: This Challenge will consist of four weekly Entry Periods as follows (each an “Entry Period”)   - 12:00 a.m. PT on June 17, 2024 – 11:59 p.m. PT on June 23, 2024 - 12:00 a.m. PT on June 24, 2024 – 11:59 p.m. PT on June 30, 2024 - 12:00 a.m. PT on July 1, 2024 – 11:59 p.m. PT on July 7, 2024 - 12:00 a.m. PT on July 8, 2024 – 11:59 p.m. PT on July 14, 2024   Entries will be eligible for the Entry Period in which they are received and will not carryover to subsequent weekly entry periods.  You must enter into each weekly Entry Period separately.   How to Enter: We invite you to participate in a quest to provide "Accepted Solutions" to as many questions as you can. Answers can be provided in all the communities. Users must provide a solution which can be an “Accepted Solution” in the Forums in all of the communities and there are no limits to the number of “Accepted Solutions” that a member can provide for entries in this challenge, but each entry must be substantially unique and different.    Winner Selection and Prizes: At the end of each week, we will list the top ten (10) Community users which will consist of: 5 Community Members & 5 Super Users and they will advance to the final drawing. We will post each week in the News & Announcements the top 10 Solution providers.  At the end of the challenge, we will add all of the top 10 weekly names and enter them into a random drawing.  Then we will randomly select ten (10) winners (5 Community Members & 5 Super Users) from among all eligible entrants received across all weekly Entry Periods to receive the prize listed below. If a winner declines, we will draw again at random for the next winner.  A user will only be able to win once overall. If they are drawn multiple times, another user will be drawn at random.  Individuals will be contacted before the announcement with the opportunity to claim or deny the prize.  Once all of the winners have been notified, we will post in the News & Announcements of each community with the list of winners.   Each winner will receive one (1) Pass to the Power Platform Conference in Las Vegas, Sep. 18-20, 2024 ($1800 value). NOTE: Prize is for conference attendance only and any other costs such as airfare, lodging, transportation, and food are the sole responsibility of the winner. Tickets are not transferable to any other party or to next year’s event.   ** PLEASE SEE THE ATTACHED RULES for this CHALLENGE**   Week 1 Results: Congratulations to the Week 1 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge.   Community MembersNumber SolutionsSuper UsersNumber Solutions Deenuji 9 @NathanAlvares24  17 @Anil_g  7 @ManishSolanki  13 @eetuRobo  5 @David_MA  10 @VishnuReddy1997  5 @SpongYe  9JhonatanOB19932 (tie) @Nived_Nambiar  8 @maltie  2 (tie)   @PA-Noob  2 (tie)   @LukeMcG  2 (tie)   @tgut03  2 (tie)       Week 2 Results: Congratulations to the Week 2 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 2: Community MembersSolutionsSuper UsersSolutionsPower Automate  @Deenuji  12@ManishSolanki 19 @Anil_g  10 @NathanAlvares24  17 @VishnuReddy1997  6 @Expiscornovus  10 @Tjan  5 @Nived_Nambiar  10 @eetuRobo  3 @SudeepGhatakNZ 8     Week 3 Results: Congratulations to the Week 3 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 3:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji32ManishSolanki55VishnuReddy199724NathanAlvares2444Anil_g22SudeepGhatakNZ40eetuRobo18Nived_Nambiar28Tjan8David_MA22   Week 4 Results: Congratulations to the Week 4 qualifiers, you are being entered in the random drawing that will take place at the end of the challenge. Week 4:Community MembersSolutionsSuper UsersSolutionsPower Automate Deenuji11FLMike31Sayan11ManishSolanki16VishnuReddy199710creativeopinion14Akshansh-Sharma3SudeepGhatakNZ7claudiovc2CFernandes5 misc2Nived_Nambiar5 Usernametwice232rzaneti5 eetuRobo2   Anil_g2   SharonS2  

Check Out | 2024 Release Wave 2 Plans for Microsoft Dynamics 365 and Microsoft Power Platform

On July 16, 2024, we published the 2024 release wave 2 plans for Microsoft Dynamics 365 and Microsoft Power Platform. These plans are a compilation of the new capabilities planned to be released between October 2024 to March 2025. This release introduces a wealth of new features designed to enhance customer understanding and improve overall user experience, showcasing our dedication to driving digital transformation for our customers and partners.    The upcoming wave is centered around utilizing advanced AI and Microsoft Copilot technologies to enhance user productivity and streamline operations across diverse business applications. These enhancements include intelligent automation, AI-powered insights, and immersive user experiences that are designed to break down barriers between data, insights, and individuals. Watch a summary of the release highlights.    Discover the latest features that empower organizations to operate more efficiently and adaptively. From AI-driven sales insights and customer service enhancements to predictive analytics in supply chain management and autonomous financial processes, the new capabilities enable businesses to proactively address challenges and capitalize on opportunities.    

Updates to Transitions in the Power Platform Communities

We're embarking on a journey to enhance your experience by transitioning to a new community platform. Our team has been diligently working to create a fresh community site, leveraging the very Dynamics 365 and Power Platform tools our community advocates for.  We started this journey with transitioning Copilot Studio forums and blogs in June. The move marks the beginning of a new chapter, and we're eager for you to be a part of it. The rest of the Power Platform product sites will be moving over this summer.   Stay tuned for more updates as we get closer to the launch. We can't wait to welcome you to our new community space, designed with you in mind. Let's connect, learn, and grow together.   Here's to new beginnings and endless possibilities!   If you have any questions, observations or concerns throughout this process please go to https://aka.ms/PPCommSupport.   To stay up to date on the latest details of this migration and other important Community updates subscribe to our News and Announcements forums: Copilot Studio, Power Apps, Power Automate, Power Pages

Users online (2,152)