I have a list of IDs and in my scenario I would like to add a step where I can randomly pick an ID from this list and it would be a different one every time.
HI Laura. There are many ways to do this. What is it that you are trying to achieve? Do you need to avoid duplicates? Once one id has been selected can it be selected again? etc etc.
@IainM thanks for your reply.
I am creating an activity in pipedrive and the team is composed of several people, which all have their ID. And y goal is to randomly attribute each of the activities created to one member of the team.
So one ID can be selected several times.
The end result will likely be more complex than this as you add your specific requirements but the easiest way to do it is to use the “set variable” module to generate a random number using the formula
{{round(random * 10)}}
That will generate a random number between 0 and 10. You can then set up the filters to route according to the value generated. See below.
@IainM thanks
Looks like it’s working and choosing randomly a number but I had like an infinity of run. Whereas I would like it to run only once for one operation before. Do you know how I could fix this ?
Actually, it initially was after the set variable module which is why I also have 187 operations on it so I moved it before.
Sorry should have cleared that out before i sent the screenshot.
Here you can see how it was configured when I lauched it :
@IainM it seems like the issue is from the set variable module, which keeps creating operations with random number instead of being executed only one time …
i just noticed though you had a “set multiple variable” module earlier in the scenario. How about adding the random number generator in there and removing the other set variable module. that way it doesn’t cost you any more operations but also getting rid of the module might hopefully stop the anomaly.
Well the set up multiples variable is the module where I say that variable 1 = the Pipedrive ID of user 1, variable 2 = the pipedrive ID of user 2 etc. so I have to keep it. But maybe I can move it after the round function module and see if it resolves the issue.
@Laura Your operations start adding up after your pipedrive module.
Most likely the Search you are doing outputs a large amount of records (so the search is not working correctly). Can you show settings & the output (the round circle above the module) of the Pipedrive module?
Make sure those are working correctly
i wasn’t suggesting remove the multivariable simply add the random variable to it and call on it later (the variables don’t have to be related in that module).
@Bjorn.drivn is totally right (as always). The output from your pipedrive search is generating the additional operations 1 op to do the search but it it passes on i(in this case) 187 to the next module
@Bjorn.drivn
But I have a value with a specific ID to search for in Pipedrive. I really don’t understand where all the outputs are coming from.
Any idea how to fix this ?
I do not know what you are doing with your Text Parser @Laura (the input of the Pipedrive module). But I would recommend you make sure the search is working first, by manually testing with just hardcoded values, before you continue working on the rest.
The limit of your Pipedrive module is 200; which shouldn’t be an issue if you search for a specific Organization, but if your search term is incorrect it will return 200 records
Haha just something you see quickly out of some good experience
I think @IainM will be able to help you from here. Just make sure the search you are doing is working properly @Laura
Right looks like the error was coming from the match pattern that wasn’t working correctly causing issues in the pipedrive module and so on.
Thank you very much @IainM and @Bjorn.drivn for your help !