Able to do nested airscript?

Just wondering if it is possible to do a nested airscript? Like something like this

CURRENCY(
  PARSE_NUMBER(
    string
  ),
  "USD",
  0
)

@Wilson_Wong: Yes it is possible to nest functions within Airscript as much as you would like.

There are some good examples of this available here to check out: Airscript Examples

2 Likes

Hey Adam,

I tried this and I keep getting an error, thoughts?

CURRENCY(
  PARSE_NUMBER(
    "1199.90”
  ),
  "USD",
  0
)

You could try PARSE_CURRENCY(“1199.90”, “USD”)

The CURRENCY function expects a whole number as its first parameter.

Hope this makes sense.

2 Likes

@Wilson_Wong I created a quick example app and here’s a screen shot of it working in a transform step of a data flow (TIP: this is a really useful way to just test arbitrary Airscript expressions).

We’re happy to help you more directly over our public Slack org - you can request access here: AK Devs Slack Invites

1 Like

Here is the example app attached as well just in case it’s helpful

Currency_Example-2022-03-16T18_54_59.864Z-full.branch.zip (12.7 KB)

2 Likes