Help with Search Module limits | Community
Skip to main content
BrandonNW
Level 6
January 5, 2022
Solved

Help with Search Module limits

  • January 5, 2022
  • 2 replies
  • 2075 views

Happy New Year!!

I have a scenario where I am connecting to HR data to search for terminated users and deactivate them in WF. The process itself is very simple, but I am running into an issue with the 2000 maximum search limit. We have over 2000 users, so basically the functionality works, but only for the first 2000 users. I am guessing I am missing something silly that will allow me to search all users, but I am not sure what I am missing.

Use Case:

Pull all HR user records and then search WF for user records that do not match and deactivating those users.

Thanks!!

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by AndyHess

Using paginated responses in Fusion, require usage of several API features. $$LIMIT and $$COUNT along with the Fusion Repeater module.

  1. objcode/count? Using this URL as a custom api call along with the needed filters that align to your eventual call will provide a number of records
  2. use the repeater module, initial value = 0 and the Repeats a formula of the count {{ceil(6.body.data.count / 200)}}. The integer shown is the value of the limit you plan to use in #3
  3. objcode/search? Now do your search for records that can be higher than the 2K limit. use the same filter in #1. The keys here are the $$LIMIT filter and the $$FIRST filters. $$LIMIT is your records/search and $$FIRST is the repeat# times the limit or {{(7.i * 200)}}

I placed a simple blueprint of this method. It's fairly straightforward.

2 replies

William--
Community Advisor
Community Advisor
January 9, 2022

You might want to get familiar with paginated API responses and add a repeater module with that logic.

Alternatively, as part of these kinds of scenarios I like to tag the user's Workfront profile with the fact that the user has been checked against the other platform, so I do an update record module early in the scenario where I update a custom field on the user's profile with the date that the other platform was last checked. This enables filtering/reporting in Workfront ("How long since this profile was last checked against HR?") and also helps with the scenario because I can add a filter on the search module "DE:Other Platform Date Last Checked = null" (or less than today). This way when I run the scenario a second/third/fourth/... time, it skips all the users whose profiles have a value recorded in that custom field on their profile, until all users have a value recorded.

If you like my content, please take a moment to view and vote on my Idea Requests: https://tinyurl.com/4rbpr7hf
BrandonNW
BrandonNWAuthor
Level 6
January 10, 2022

Thanks Will. That sounds like it might do the trick! Now I just gotta figure out how to use the paginated response. 😋

William--
Community Advisor
Community Advisor
January 10, 2022

Sure thing, Brandon.

To be clear, the approach I described is a workaround to having to use paginated responses. If you tag the profile as you check the user, you can use that tag as a filter on the search module of your scenario so it only looks for users who haven't been tagged/checked. So the first run will be limited to your first 2,000 users, but the next time you run it, the search module will skip those users and move on to the next 2,000, and so on.

If you like my content, please take a moment to view and vote on my Idea Requests: https://tinyurl.com/4rbpr7hf
AndyHess
Adobe Employee
AndyHessAdobe EmployeeAccepted solution
Adobe Employee
January 11, 2022

Using paginated responses in Fusion, require usage of several API features. $$LIMIT and $$COUNT along with the Fusion Repeater module.

  1. objcode/count? Using this URL as a custom api call along with the needed filters that align to your eventual call will provide a number of records
  2. use the repeater module, initial value = 0 and the Repeats a formula of the count {{ceil(6.body.data.count / 200)}}. The integer shown is the value of the limit you plan to use in #3
  3. objcode/search? Now do your search for records that can be higher than the 2K limit. use the same filter in #1. The keys here are the $$LIMIT filter and the $$FIRST filters. $$LIMIT is your records/search and $$FIRST is the repeat# times the limit or {{(7.i * 200)}}

I placed a simple blueprint of this method. It's fairly straightforward.

BrandonNW
BrandonNWAuthor
Level 6
January 13, 2022

Thanks Andy! The blueprint was super helpful. I am still very much so a beginner in the Fusion world and being able to see the modules already built out made it quite easy to tweak them for my particular scenario. This isn't perfect yet, and I still have a couple filters to work out, but the repeater module with the paginated calls got me passed that hurdle at least. 😊 Very much appreciated sir!