# Apple Training package: Virtual List and ExecuteSQL Activity Not Working

**URL:** <https://the.fmsoup.org/t/apple-training-package-virtual-list-and-executesql-activity-not-working/1954>\
**Category:** Questions\
**Tags:** scripting\
**Created:** [March 24, 2021, 10:57am UTC](https://the.fmsoup.org/t/apple-training-package-virtual-list-and-executesql-activity-not-working/1954 "2021-03-24T10:57:28Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![backagain](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/backagain/32/1342_2.png) [@backagain](https://the.fmsoup.org/u/backagain)\
**Post date:** [March 24, 2021, 10:57am UTC](https://the.fmsoup.org/t/apple-training-package-virtual-list-and-executesql-activity-not-working/1954/1 "2021-03-24T10:57:28Z")

</div>

In an old training package based on FM 15, there's a step by step activity with a solution file to play with.

 ![PastedGraphic-1](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/8/8b01978d6643063c011e5c90879abda1ac8549a8.png)

 ![PastedGraphic-1](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/4/490b473d2c71b529998d005a276fe60a064b581a.png)

At step 7, the global is not even created, not seen in the DataViewer's watch while $$ArrayBlaBla is. What's the problem? Do I have to separate out anything with & in the calculation?

 ![PastedGraphic-3](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/c/c5717a3f0ac0780d2791d8a153382ac22caf1590.png)

 ![PastedGraphic-4](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/7/76faa490d3cb301dfe3f3fb20c312fb561df1e8e.png)

Here's the solution file:

[06b\_Bonsai WorkInProgress.fmp12](https://the.fmsoup.org/uploads/short-url/1KtjgEaKRIh5fOVdODJjXikbRWu.fmp12) (5.8 MB)

---

<div class="post-metadata">

**Author:** ![Torsten](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/torsten/32/1574_2.png) [@Torsten](https://the.fmsoup.org/u/Torsten)\
**Post date:** [March 24, 2021, 12:20pm UTC](https://the.fmsoup.org/t/apple-training-package-virtual-list-and-executesql-activity-not-working/1954/2 "2021-03-24T12:20:26Z")

</div>

The query is looking for records with DateOrdered between 01 Jan 2021 and 24 Mar 2021.  
Does any of the records meet the criteria?

---

<div class="post-metadata">

**Author:** ![bdbd](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/bdbd/32/620_2.png) [@bdbd](https://the.fmsoup.org/u/bdbd)\
**Post date:** [March 24, 2021, 12:22pm UTC](https://the.fmsoup.org/t/apple-training-package-virtual-list-and-executesql-activity-not-working/1954/3 "2021-03-24T12:22:16Z")

</div>

The calculation contains no syntax error, otherwise you would have a global variable with the value "?" (no quotes). Therefore, the SQL statement returned nothing, meaning no record satisfied the query.

---

<div class="post-metadata">

**Author:** ![bdbd](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/bdbd/32/620_2.png) [@bdbd](https://the.fmsoup.org/u/bdbd)\
**Post date:** [March 24, 2021, 12:23pm UTC](https://the.fmsoup.org/t/apple-training-package-virtual-list-and-executesql-activity-not-working/1954/4 "2021-03-24T12:23:08Z")

</div>

Forgot to say… welcome to the soup "Gaston".

---

<div class="post-metadata">

**Author:** ![backagain](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/backagain/32/1342_2.png) [@backagain](https://the.fmsoup.org/u/backagain)\
**Post date:** [March 24, 2021, 5:00pm UTC](https://the.fmsoup.org/t/apple-training-package-virtual-list-and-executesql-activity-not-working/1954/5 "2021-03-24T17:00:50Z")

</div>

Success! Replaced the first argument with a hard-coded 1999.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/d/debd3030c99ae147b8b0301654aa1f92cae8e956.png)

Thank you Torsten and bdbd!

I should have seen that but the activities beforehand have been so flawless, easy to use. Looking at the code and tables, I had presumed a grave error or ignorance of Filemaker on my part yet the error lied in assuming users of the training package would use it the same year the package was created. But I still feel stupid. lol 🙂 Should have looked at the data.

---

<div class="post-metadata">

**Author:** ![Torsten](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/torsten/32/1574_2.png) [@Torsten](https://the.fmsoup.org/u/Torsten)\
**Post date:** [March 24, 2021, 5:45pm UTC](https://the.fmsoup.org/t/apple-training-package-virtual-list-and-executesql-activity-not-working/1954/6 "2021-03-24T17:45:29Z")

</div>

Great that you got it working. Welcome to fmsoup @backagain!

It happens to us all, having the thing right before our eyes and yet we don't recognise it. Two pairs of eyes see more than one pair of eyes... That second pair of eyes can be a fellow developer here @ fmsoup 🙂

---

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [March 24, 2021, 7:40pm UTC](https://the.fmsoup.org/t/apple-training-package-virtual-list-and-executesql-activity-not-working/1954/7 "2021-03-24T19:40:33Z")

</div>

Welcome to the soup @backagain . Be warned that there are some errors in the FileMaker Training series. It is an excellent resource but a couple of errors slipped past the editors. You may bump into something else that doesn't look right.

---

<div class="post-metadata">

**Author:** ![backagain](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/backagain/32/1342_2.png) [@backagain](https://the.fmsoup.org/u/backagain)\
**Post date:** [March 24, 2021, 8:01pm UTC](https://the.fmsoup.org/t/apple-training-package-virtual-list-and-executesql-activity-not-working/1954/8 "2021-03-24T20:01:56Z")

</div>

Yes, I found another bothersome error in the same activity. Posting soon.  
Thanks for the warning.  
Are there better beginner/intermediate training resources you know of? (so that I don't feel like deleting Filemaker off my drive while shouting every profane expletive I know)

I'd been going through Richard Carlton's Udemy courses but I was guided by a pro to this old FM 15 series as superior and complete.

The explanations are certainly good. This is the first example that doesn't work for me. Maybe someone like me just needs to make an accompanying errata sheet and post it on this site along with the course material. 🙂

---

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [March 24, 2021, 8:03pm UTC](https://the.fmsoup.org/t/apple-training-package-virtual-list-and-executesql-activity-not-working/1954/9 "2021-03-24T20:03:53Z")

</div>

I think it is an excellent resource. It is comprehensive and the examples are excellent. They have practical applications and they introduce fundamental concepts in a sensible way.

---

<div class="post-metadata">

**Author:** ![backagain](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/backagain/32/1342_2.png) [@backagain](https://the.fmsoup.org/u/backagain)\
**Post date:** [March 24, 2021, 8:24pm UTC](https://the.fmsoup.org/t/apple-training-package-virtual-list-and-executesql-activity-not-working/1954/10 "2021-03-24T20:24:27Z")

</div>

![image](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/f/fc9b4448b6c655346e24a1c8bec8df8936bdfc20.png)

My layout only updates the record when I edit/update the row number.

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/1/1c0c9757630a4b23c3d0fd2f8c39c4613f747e2d.jpeg)

If the calculation is unstored, this should not happen. But I cannot find the option which used to look like this "Do not store calculated results":

![image](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/d/d65512f2682f167c5cd2ca5a4fe23557a96bcbcb.png)

Can't find it:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/0/00e7765db5e2401736707a5aa911e5111e43ce54.png)

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/5/5f57b8de0243851fe4f867b316ed6312fcbed7b5.png)

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/fmsoup/original/2X/1/1d80d84ea6e929a04cb1b9eaa4e184f0ad9af471.png)

---

<div class="post-metadata">

**Author:** ![Malcolm](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/malcolm/32/196_2.png) [@Malcolm](https://the.fmsoup.org/u/Malcolm)\
**Post date:** [March 24, 2021, 8:42pm UTC](https://the.fmsoup.org/t/apple-training-package-virtual-list-and-executesql-activity-not-working/1954/11 "2021-03-24T20:42:11Z")

</div>

You are using an auto-enter calculation on a text field. Try it with a calculation field.

---

<div class="post-metadata">

**Author:** ![backagain](https://yyz2.discourse-cdn.com/flex030/user_avatar/the.fmsoup.org/backagain/32/1342_2.png) [@backagain](https://the.fmsoup.org/u/backagain)\
**Post date:** [March 24, 2021, 9:38pm UTC](https://the.fmsoup.org/t/apple-training-package-virtual-list-and-executesql-activity-not-working/1954/12 "2021-03-24T21:38:26Z")

</div>

Yep. That was it.  
Should have been written:  
Create a new _calculation_ field, or field of "_type:_" **Calculation** , with the option _Calculation result is:_ **Text**.

Much thanks Malcolm
