This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
We have extended our Early Bird Tickets for Inspire 2023! Discounted pricing goes until February 24th. Save your spot!
I have a workflow that queries finance data. For data that is 6 months old or younger, I want to get the line item detail. For data that is older, I don't need that much detail. To make this work, I am performing 2 queries, and then unioning the data together. I am using dynamic input to build the query.
As you can see in my workflow below, I start with a datetime input. Then, I calculate 6 months backward. Then I calculate the month end for whatever that date is. That month end date is what I want to feed into the dynamic input.
HEre is the query used as the template.I have circled the bits that I want to replace.
When, I have only one modification setup here, it works, but the data is wrong because it only modifies one of my where clauses. When I add in a second modification, I get an error that says the replacement context "2019-10-31" does not exist in the template. It does exist.
Does anyone know why I can't modify both of the where clauses? Also, I have confirmed that the query used as the template is correct and works.
There are a couple of possible ways to accomplish what you're after.
1. Instead of using the 'Update Where Clause', you could use a 'Replace Specific String' and build the portion of the query you'd like to change (dynamically) ahead of the dynamic input tool.
2. In your particular example below, it looks like you could consolidate your query into a single set of criteria. After which, the dynamic replace as you have it should work fine.
Hope this helps!
Dear Alteryx Community,
This is my query
I cannot make this work :-)
the error is:
Can you please help?
Thanks :-)
It's been a long time, but I believe the solution suggested was correct. I needed to Replace a Specific String. Have you tried that?
Hello,
Thanks for supporting me, I cannot use that solution because I'm dynamically replacing a date.
But I've done the selection of the columns in a different way and now it works.
Thanks,
Ana