Conversation
kiawnna
left a comment
There was a problem hiding this comment.
@RickyAmparoCloud WOW. I found a couple very small (possibly unnecessary) changes. I'm sure Nick will have more to say ;) Great job!
| 1. Insure you have the latest non-beta version of the doctor installed via npm. You can follow the directions found [here](https://www.npmjs.com/package/ce-util) or run the command `npm install -g ce-util`. You'll need a version of node that is >= v6.3.0. You will need to upload the file from TheDoctor directory, as files uploaded with the doctor have a different structure than files imported via UI. | ||
| 2. From the TheDoctor directory, run the command: | ||
| ``` | ||
| doctor upload formulas <acctNickName> -f nestedLoops.json |
There was a problem hiding this comment.
@RickyAmparoCloud It likes like you've called the formula "formula.json" in the doctor folder. I think you'll either have to rename it or change this line to refer to "formula.json" instead of "nestedLoops.json".
| arr.push(steps.loopThroughInvoiceLines.entry.amount) | ||
|
|
||
| done({ | ||
| arr: arr |
There was a problem hiding this comment.
@RickyAmparoCloud @nick-bair I'll let Nick confirm but I want to say you don't need "arr:arr" inside of the done callback. Instead you can just pass in done ({ arr });
| * "How should I setup a loopstep from within another loop and aggragate data from the nested loop?" | ||
|
|
||
| ## Solution: | ||
| You will need to call the primary loop as the on failure branch of the nested loop. You will then need top use the standard aggregator approach to maintain the data from the nested loop. This approach is outlined below: |
| @@ -0,0 +1,3 @@ | |||
| let pageInfo = {"pageSize": 3} | |||
|
|
|||
| done({"pagination":pageInfo}) No newline at end of file | |||
There was a problem hiding this comment.
@RickyAmparoCloud Not sure it matters much, but I think you can pass in done({ pageInfo }) and just refer to .pageInfo.
There was a problem hiding this comment.
It depends how you pass it to done:
done({ pageInfo }) => access later by calling stepName.pageInfo
done(pageInfo) => access later by calling stepName
|
@RickyAmparoCloud looks great! All the feedback I have is nitpicky, so take it with a grain of salt.
|
I added the Doctor, UI versions as well as the ReadMe.