• Resolved doyenwilliams

    (@doyenwilliams)


    Hi guys,

    Here’s my case:

    Goal: I want to automatically create new LearnDash groups and populate them based on users passing a LearnDash quiz.

    *MY* Solution: Create 2 Automator recipes – 1 that moves users that have passed the quiz into a LearnDash group; and 1 that creates new groups every time X number of users are put into a group. Also, will kickstart the process by creating a group to wait on the first batch of users.

    So as is I have recipe 1, let’s call it MOVE:
    – trigger = user scores x% on quiz Y
    – action = move user into LearnDash group with name Static-<<variable>>

    and recipe 2, let’s call it CREATE:
    – trigger = every Y times MOVE is successfully completed (thanks again for this trigger)
    – action = create a LearnDash group with name Static-<<variable>>

    This issue then is two-fold:
    1 – I need <<variable>> in the CREATE recipe to be a simple incrementing number – but there is no option for that
    2 – I need some way of tying <<variable>> in the MOVE recipe to the same incrementing number from CREATE

    My suggestion is that in the name section you allow us access to TWO more declarations:
    (a) some kind of incrementing value where we can input the starting value and the increment on each recipe run;
    (b) the number of times a recipe (whether self or other) has been run

    There may be a much simpler way to achieve this, or just an alternative, if so – please advise.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter doyenwilliams

    (@doyenwilliams)

    Thought I had found a workaround by setting a user meta key pair that captured the number of times a recipe was run, however:

    (a) the “number of times run” trigger is listed under “everyone” and not available under “logged in users”. Meaning I can only affect the meta key of a single, identified user (the one designated as the person the recipe is running against); and

    (b) the action of moving users is tied to the “logged in users” side and so the recipe is run only against the current user, making any meta key I try to set using the “number of times run” trigger irrelevant

    Back to the drawing board…

    Plugin Author Uncanny Owl

    (@uncannyowl)

    It’s an interesting scenario. Right now there is no support for math equations (e.g. add 1 to an existing value we look up) or number of times a recipe has run for logged in users across all users. But even if we had the latter, you’d have a very difficult time time telling Automator which group to map to recipe number 1 (since the counter would keep increasing after the group was created). Given that, would us adding the number of total times a logged in recipe has run as a token help? Yesterday’s 3.1.4 release allows recipes that only fire every X runs of another recipe, but if we added a token you would need it to look up how many times ANOTHER recipe has run (to get the group mapping right) and that’s where I’m not sure an easy solution on our side would help.

    I unfortunately can’t think of a way to do this right now, not with dynamic group creation and users being added to newly created groups. We could definitely consider a token for the # of times a recipe has run against all users for logged in recipe (the incrementing stored number would be much further away as a target), but I’m not sure it would really help you.

    Thread Starter doyenwilliams

    (@doyenwilliams)

    hmmm… dangit – ok – will continue to slug it out and let you guys know if I come up with anything.

    …but YES – adding the token would be help – as it would be one less thing to solve around.

    many thanks!

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Set an incrementing number in the name of an LD Group’ is closed to new replies.