Search code examples
flowgear

How to deal with arrays in the QuickMap function in Flowgear


I need to match one field called defaultAddress in NetSuite into several fields (Address1, city, State, PostCode and Country) in Autotask.

IIF(ISEMPTY({defaultAddress}), "No Address is provided",SPLIT(REPLACE({defaultAddress}, "", ","), ","))

I have used several Quickmap functions and I have successfully split the original default address into an array. But I can't use array[index] to get a certain part.

Is there a better way that I can split the address and match it with the corresponding fields?

Thanks


Solution

  • Quickmap is backed by VB script, so the way to use indexing is (0) instead of [0] for C#. You can use: IIF(ISEMPTY({defaultAddress}), "No Address is provided",SPLIT({defaultAddress}, ","))(0) IIF(ISEMPTY({defaultAddress}), "No Address is provided",SPLIT({defaultAddress}, ","))(1)

    You can see a simple example here: https://flowgear.me/s/b4Dngzi