• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Combine a query of strings and then search

Participant ,
Jan 21, 2019 Jan 21, 2019

Copy link to clipboard

Copied

I have a query that returns results like this

Row 1 -C,HU,NU,PO, CY, CAB

Row 2 - A,AB,AB,ABC,TY,GYU 

So I need to combine these results into one string and then see if the string 'CAB' is in the new combined string.

If it is, then output Yes

How do I do this easily?

Views

571

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , Jan 21, 2019 Jan 21, 2019

weezerboy  wrote

So I need to combine these results into one string.

// Combine comma-delimited list

combinedList=listAppend(list1,string2);

... see if the string 'CAB' is in the new combined string.

If it is, then output Yes

if (listFindNoCase(combinedList, "CAB") gt 0) {

   writeoutput("Yes");

}

Votes

Translate

Translate
Community Expert ,
Jan 21, 2019 Jan 21, 2019

Copy link to clipboard

Copied

weezerboy  wrote

So I need to combine these results into one string.

// Combine comma-delimited list

combinedList=listAppend(list1,string2);

... see if the string 'CAB' is in the new combined string.

If it is, then output Yes

if (listFindNoCase(combinedList, "CAB") gt 0) {

   writeoutput("Yes");

}

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jan 21, 2019 Jan 21, 2019

Copy link to clipboard

Copied

As always - thank you

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 21, 2019 Jan 21, 2019

Copy link to clipboard

Copied

LATEST

My pleasure, weezerboy

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation