Xero contact search - user defined condition

I have a scenario where I search Xero contacts for some text defined in a previous module. I was previously using a formula to define the text to search for but this was not working. I then tried the ‘user defined condition’ option which lets you use an HTTP Get. My issue is that I need to manipulate text from a previous Pipedrive module to pass to the API call. Which module in Make can I use to do this? I am currently using a compose a string module with a ‘Substring()’ formula to extract the text I need. However, this is coming up blank.

Thanks in advance for any help!




Hey @Malkier,

Great to see your question here in the community! :slight_smile:

I just wanted to clarify that this is a community of Make users helping out and sharing knowledge. This means we don’t have access to any of your scenarios, organizations etc.
It’s therefore always best to share some screenshots so that the community can see what’s going on in your scenarios visually.

Detailed information could be provided for example by an:

  1. overview of your scenario setup (functions, mappings, variables etc.)
  2. the input area of the module you are having trouble with
  3. the output area of the module you are getting data from

Thank you!

In case you think this is not needed, please disregard this message. I have send this message by automation since you don’t have any attachments.

Thanks - have added screenshots…

1 Like

Hi @Malkier,

Your formula seems off. The indexOf() needs an argument. Are you just trying to extract the first name or something?

1 Like

Hi @loic.wiseflow,

It seems I was missing a semicolon between the ‘5.Name’ and the ‘space’. My intent is to find the first space and used the first word in the string to search for a contact in Xero.

Hi @Malkier,

If this does not work try the formula:

get(split({{name}};{{space}});1)

This formula split your string using the space as the divider and returns an array of substrings. Then the get formula returns the first item of the array.

1 Like

Hi @loic.wiseflow ,

Thanks that has worked. I’m not sure why the previous one failed.

If I wanted to return everything before the second space (i.e. The first two words) how would I modify this formula?

Thanks again for your help!

I first tried:

{{get(split(name; space); 1+space+2)

…which didn’t work.

But then this worked:

{{get(split(name; space); 1) + space + get(split(name; space); 2)}}

1 Like