Forum Discussion
Looping API Requests: references other queries or steps, so it may not directly access a data source
Hey Blopez11,
Thanks for your help.
Apologies for the confusion, GetDateByTimesheetID and timeSheetFromId are the same thing - bad naming on my part. In terms of the full breakdown:
Function that generates the dates I requireThe loop function itselfThis takes an API URL and access tokens and makes the call
Splicing Week/User data to make a
UserWeekStagedDate - Just combines the dates with the IDs and expands the dates out.
Bringing everything together
It's a little bit convoluted exactly because I've tried to break everything up into functions. Is it possible the date generation part needs to be split out into its own function?
I still don't see how it's considered mixing data sources at this point, or am I just getting the "Catch-all can't cope" error?
Cheers,
laurie_oa
I do agree with you on that pulling data from the same sources shouldn't be considered mixing
I have run into that with web services pulling from the same root url
Anyway, I think you may need to encapsulate the UserWeekStaged into a function, and quite possibly TimesheetWeeks
Web services are quite finicy, in that what works in the desktop doesn't always work in the service