# Exercise Script Step

**URL:** https://forum.novacura.com/t/exercise-script-step/342
**Category:** Classic - Training
**Tags:** flow-basics
**Created:** [November 18, 2022, 6:49am UTC](https://forum.novacura.com/t/exercise-script-step/342 "2022-11-18T06:49:32Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![alyazia](https://avatars.discourse-cdn.com/v4/letter/a/7C9FD7/32.png) [@alyazia](https://forum.novacura.com/u/alyazia)
#### Post date: [November 18, 2022, 6:49am UTC](https://forum.novacura.com/t/exercise-script-step/342/1 "2022-11-18T06:49:32Z")

</div>

I’m getting an error in my script step saying Unexpected operand

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/novacuratalk/original/1X/81e5fcbd2a8bf6318ad6f1ca0556b7c66c036f89.png)

---

<div class="post-metadata">

### Author: ![OlaCarlander](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.novacura.com/olacarlander/32/205_2.png) [@OlaCarlander](https://forum.novacura.com/u/OlaCarlander)
#### Post date: [November 18, 2022, 12:43pm UTC](https://forum.novacura.com/t/exercise-script-step/342/2 "2022-11-18T12:43:42Z")

</div>

Hi, has to do with versions again, thanks for noticing. I have updated the material to:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/novacuratalk/original/1X/b62fb3ae789bf63f299460bb39df5731ce8f2ce6.png)

So for you, just replace the code with:  
Return YourQuoteLines;

---

<div class="post-metadata">

### Author: ![alyazia](https://avatars.discourse-cdn.com/v4/letter/a/7C9FD7/32.png) [@alyazia](https://forum.novacura.com/u/alyazia)
#### Post date: [November 21, 2022, 5:24am UTC](https://forum.novacura.com/t/exercise-script-step/342/3 "2022-11-21T05:24:47Z")

</div>

![image](https://europe1.discourse-cdn.com/flex013/uploads/novacuratalk/original/1X/f69d040b8c5b80cda35e27630d52dd7a309d02b2.png)  
Also here I changed it to `Result = Result + (SalesOrderLines.PriceEach);` but still its giving me an error “This variable cannot be iterated”.

---

<div class="post-metadata">

### Author: ![OlaCarlander](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.novacura.com/olacarlander/32/205_2.png) [@OlaCarlander](https://forum.novacura.com/u/OlaCarlander)
#### Post date: [November 21, 2022, 7:54am UTC](https://forum.novacura.com/t/exercise-script-step/342/4 "2022-11-21T07:54:32Z")

</div>

If you “show available variables” just after the flowscript, what does that look like?

![image](https://europe1.discourse-cdn.com/flex013/uploads/novacuratalk/original/1X/df3d1bd6c46ac829b0acbce68cad5781297cfeaa.png)

---

<div class="post-metadata">

### Author: ![alyazia](https://avatars.discourse-cdn.com/v4/letter/a/7C9FD7/32.png) [@alyazia](https://forum.novacura.com/u/alyazia)
#### Post date: [November 21, 2022, 8:05am UTC](https://forum.novacura.com/t/exercise-script-step/342/5 "2022-11-21T08:05:54Z")

</div>

![image](https://europe1.discourse-cdn.com/flex013/uploads/novacuratalk/original/1X/f920ef5440b747b18e73872406d9cbe244a7c6ed.png)  
This is it.

---

<div class="post-metadata">

### Author: ![OlaCarlander](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.novacura.com/olacarlander/32/205_2.png) [@OlaCarlander](https://forum.novacura.com/u/OlaCarlander)
#### Post date: [November 21, 2022, 8:29am UTC](https://forum.novacura.com/t/exercise-script-step/342/6 "2022-11-21T08:29:07Z")

</div>

Ah, note how you have a slightly different symbol before SalesOrderLines? Indicates it is a record variable and not a table variable. So open that and make sure you have the correct database call type (multiple records)

---

<div class="post-metadata">

### Author: ![alyazia](https://avatars.discourse-cdn.com/v4/letter/a/7C9FD7/32.png) [@alyazia](https://forum.novacura.com/u/alyazia)
#### Post date: [November 21, 2022, 8:36am UTC](https://forum.novacura.com/t/exercise-script-step/342/7 "2022-11-21T08:36:33Z")

</div>

Okay thank you so much, I updated it and removed my errors.

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/novacuratalk/original/1X/c17049c9c079398da1217b7f4a94a7bc6195232a.png)  
This is from exercise 1 in the image map  
I think the Database call type needs to be updated

---

<div class="post-metadata">

### Author: ![OlaCarlander](https://dub1.discourse-cdn.com/flex013/user_avatar/forum.novacura.com/olacarlander/32/205_2.png) [@OlaCarlander](https://forum.novacura.com/u/OlaCarlander)
#### Post date: [November 21, 2022, 11:44am UTC](https://forum.novacura.com/t/exercise-script-step/342/8 "2022-11-21T11:44:14Z")

</div>

Or should we keep it and have it as a troubleshooting exercise? If so, mention something about that “you will get an error, try to troubleshoot it or follow the next exercise to see how” sort of thing.

Or is it better to have a completely separate troubleshooter course with a staged flow with a bunch of errors to fix?

---

<div class="post-metadata">

### Author: ![alyazia](https://avatars.discourse-cdn.com/v4/letter/a/7C9FD7/32.png) [@alyazia](https://forum.novacura.com/u/alyazia)
#### Post date: [November 21, 2022, 11:47am UTC](https://forum.novacura.com/t/exercise-script-step/342/9 "2022-11-21T11:47:21Z")

</div>

> [@OlaCarlander](#):
>
> Or should we keep it and have it as a troubleshooting exercise? If so, mention something about that “you will get an error, try to troubleshoot it or follow the next exercise to see how” sort of thing.

Yes, would be nice to have a hint that there will be an error trainee tries to fix. 🙂
