# Automation Designer: Export Dataset not using Env Variables

**URL:** <https://forums.toadworld.com/t/automation-designer-export-dataset-not-using-env-variables/53698>\
**Category:** Toad for Oracle & DevOps Toolkit\
**Created:** [September 24, 2021, 9:33pm UTC](https://forums.toadworld.com/t/automation-designer-export-dataset-not-using-env-variables/53698 "2021-09-24T21:33:15Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![david.hicken](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@david.hicken](https://forums.toadworld.com/u/david.hicken)\
**Post date:** [September 24, 2021, 9:33pm UTC](https://forums.toadworld.com/t/automation-designer-export-dataset-not-using-env-variables/53698/1 "2021-09-24T21:33:15Z")

</div>

Oracle 18.0  
Toad 14.2.104.1069

Short AD App: (2 Actions, with a message for checking)

 ![image](https://global.discourse-cdn.com/quest/original/2X/2/2f2f0366d7acad8197b37c711651bcb85ee90eb9.png)

![image](https://global.discourse-cdn.com/quest/original/2X/d/d09af8ffe8ea5965b1f2bddec152009212bbfb86.png)

 ![image](https://global.discourse-cdn.com/quest/original/2X/1/1c48de30225f26f13e2efaa0fde5351e9245ae61.png)

(both &start\_date and &end\_date use the appropriate Environment Variable)

When I run the script in the Editor, and put literals of '06/01/2021' and '08/31/2021' in respectively, it returns tons of rows. But the **[Export Dataset]** doesn't return any rows.

Am I using the Environment Variables incorrectly?

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [September 24, 2021, 9:48pm UTC](https://forums.toadworld.com/t/automation-designer-export-dataset-not-using-env-variables/53698/2 "2021-09-24T21:48:52Z")

</div>

You're so close.

In the "Variables" dialog of export dataset, you need to specify the query iterator variable as %Qtr\_IT.START\_DATE%. You are missing the % signs, and I think it's case sensitive too.

And when you run the action - run the query iterator action, not the actions under it (Looks like you are doing that already, just thought I'd add it for completeness)

 ![image](https://global.discourse-cdn.com/quest/original/2X/5/59eacb3353d683edcda13b66709430952971a5b1.png)

---

<div class="post-metadata">

**Author:** ![david.hicken](https://avatars.discourse-cdn.com/v4/letter/d/4af34b/32.png) [@david.hicken](https://forums.toadworld.com/u/david.hicken)\
**Post date:** [September 24, 2021, 10:23pm UTC](https://forums.toadworld.com/t/automation-designer-export-dataset-not-using-env-variables/53698/3 "2021-09-24T22:23:11Z")

</div>

![image](https://global.discourse-cdn.com/quest/original/2X/c/c36b224f86d4a577f8f0f66d56733afd9b97a3b5.png)

I really appreciate your TOAD notes on Dropbox.  
On page 3 of _Automation Designer - Passing variables to Export Dataset_ it shows the above. (no %)

**Got it to work**. It was both the % and the fact that I was using the same variable in both substitution variables.

🤦‍♂️ You'd think I was a rookie at SQL doing that kind of dumb.

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [September 24, 2021, 10:26pm UTC](https://forums.toadworld.com/t/automation-designer-export-dataset-not-using-env-variables/53698/4 "2021-09-24T22:26:23Z")

</div>

I'm glad the stuff in my dropbox was (mostly) helpful. I'll update it. Thanks.
