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 / Select a check box dep...
Power Automate
Answered

Select a check box depending on month/year

(0) ShareShare
ReportReport
Posted on by 33

I have a PAD flow set up.  Works great.

 

However, I needed to add a Wait command in order to choose the correct month/year

Screenshot 2022-02-22 155520.jpg

I would like to automate this entire flow.  I have about 20 properties I do this for with 9 reports each.

Rather than sitting and manually choosing the month, is there a way to have PAD automatically choose the correct month?

 

Thanks,

 

David

I have the same question (0)
  • Verified answer
    MichaelAnnis Profile Picture
    5,727 Moderator on at

    I would be surprised if you can't find the UI element for these checkboxes

    Next would be hotkeys.  If you hold down Alt do any underlines appear?

     

    If neither of those work, and this is always being ran on your computer, Wait for Image and Move Mouse to Image will work just fine for this situation.  You can put a Switch Case in and say:

     

    Select Case %Month_mm%

        Case = '01'

        Wait for Image "Jan"

        Move mouse to image "Jan" with left click

        Case = '02'

        Wait for Image "Feb"

        Move mouse to image "Feb" with left click

        Case = '03'

        Wait for Image "Mar"

        Move mouse to image "Mar" with left click

    AND SO ON

    End (Select)

     

    Good luck!

  • Verified answer
    Azrael1018 Profile Picture
    33 on at

    OK. Good feedback.

     

    One problem is the Month indicators (Jan Feb, etc) are not clickable, only the checkboxes above them.

    I can identify the checkboxes:

    Screenshot 2022-02-23 112001.jpg

    This was for Feb. I tried Mar and it said 'Unchecked' 3.  I imagine the others follow the same pattern.

    Now my question is how do I tell the flow which "Unchecked" box to check?

     

    I do not want to have to change my flows each month for the correct month.

     

    Is there a way to use a variable from outside the flow?

     

    Note that all 12 months are visible on the screen to pick from.

     

    I looked at Case and did not see how to feed it from outside the flow.

     

    So at Mar month end, I want to enter "Unchecked' 3" into a spreadsheet or something and feed the flow from that.

     

    Thanks in advance,

     

    David

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    You just have to get the M to a variable.  If you are willing to input this, you can use an input variable where you just enter the number.  If it's on a spreadsheet, then read it from the spreadsheet.  However you decide to do it, let's just call it %Month_M%

     

    Now that we have %Month_M% as a variable, there are two possible scenarios.

     

    Worst case, we use the 'Select Case' I showed you before, but instead of Wait for Image & Move Mouse to Image, we use "Set Checkbox state on web page".

     

    Better case (but I can't help you with this) is dynamic UIs.  This is where you take the %Month_M% variable and put it in the UI nomenclature to make the UI dynamic.  You only have 12 to worry about, so I don't know if I would spend a lot of time on it.  Reading posts I see mixed feedback on the success rate of this solution.  It it were me, I would capture all 12 checkbox UI elements and run the Select Case.

  • Azrael1018 Profile Picture
    33 on at

    Thank you! Worked like a charm on first report.  Should work on other 8 reports as well.

     

    However, due to my laziness, is there a way to copy the subflow to the other reports (in the main PAD Flow)?

    I have the subflow

    setup now (and working) for my Balance Sheet report.

    As MS Edge shows:

    Screenshot 2022-02-23 155113.jpg

    Screenshot 2022-02-23 154741.jpg

    Check Box, Check Box 2, Check Box 3, etc = Jan, Feb, Mar, etc.

    However, as you can see, These UI elements are under "Balance Sheet"

    MS Edge shows "BALANCE SHEET -Detail IB Report Setup"

    edit shows "BALANCE SHEET -Detail IB Parameters - Work - Microsoft​ Edge".

    The only thing that changes for the other reports are the name of the window.

    e.g. "INCOME STATEMENT - IB Report Setup"

    If the subflow can be copied to other reports in my main PAD flow, it will save hours of tedious setup.

     

    TIA,

     

    David

  • Verified answer
    MichaelAnnis Profile Picture
    5,727 Moderator on at

    David, glad you got that working:

     

    For the Window UI:

     

    Hover over that window ui element, click the 3 dots, edit selector, a new window appears.

    Again, hover over it, click the 3 dots, edit selector.

    Try unchecking Window Name, and now, assuming the UIs are the same on all windows, this should work.

     

    I have done it in Excel so my Excel UIs work on other workbooks.  Never done it anywhere else.  Good luck!

     

  • Azrael1018 Profile Picture
    33 on at

    Worked like a charm.

     

    I even figured out how to copy my subflow to other PAD flows. (copy all subflow to notepad, go to other PAD flow, create new subflow, copy from notepad to new subflow).

     

    Thanks again!

     

    David

  • MichaelAnnis Profile Picture
    5,727 Moderator on at

    Yeah, you can even skip the notepad part and can copy paste from one flow to another or from one subflow to another subflow.  Glad everything is working.

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 525 Super User 2025 Season 2

#2
Tomac Profile Picture

Tomac 324 Moderator

#3
abm abm Profile Picture

abm abm 232 Most Valuable Professional

Last 30 days Overall leaderboard