Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
eugeniyaromanov
Contributor III
Contributor III

To choose field if not contain

Hello!

I have a table:

NameContactTypeContact
1Phone12345678
1Addresstown 1, street 1, 1
1E-mailbla@bla.com
2E-mailbla1@bla.com
3Phone23456781
3Addresstown 3, street 3, 3
4Phone34567812
4Phone45678123
4Addresstown 4, street 4, 4
4Addresstown 5, street 5, 5
4E-mailbla2@bla.com

I need to select it to other table:

Phones: all in one field, divided by (;)

Address: first address in order of load

E-mail: first e-mail in order of load

I don't want to make selection depending on Type, because it happens to be phone number with address, e-mail with phone and so on.

So I decided to select numbers, text and '@'.

For mail I used: MinString(if(wildmatch(Contact,'*@*'), Contact)) and it worked (I guess only e-mail can be with '@')

For phone I used concat(num(Contact), ';') and it works fine too (it selects only number values)

But I can't figure out function for address, if there is no address it always puts an e-mail instead.

I think I want it to show only text if text does not contain @.

I've tried: MinString( if(not wildmatch(Text(Contact),'*@*'), Contact)) and it does not work properly, it shows phone or mail sometimes...

I would appreciate any help!

Thanks in advance!

1 Solution

Accepted Solutions
ahaahaaha
Partner - Master
Partner - Master

In my opinion commas 1C puts itself. The address is filled in by template. Now I will clarify with our specialists.

View solution in original post

18 Replies
sunny_talwar

I am not completely sure what you are looking to get here? Would you be able to elaborate a little?

Anil_Babu_Samineni

From this table, What would be the result you want to see. And you want to do it in Script / UI

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
eugeniyaromanov
Contributor III
Contributor III
Author

Hello Sunny!

I always have problems with explanations (((


I need to select text data from a field if this text does not contain '@'.


Basically, for address the table should be:


NameAddress
1town 1, street 1, 1
2-
3town 3, street 3, 3
4town 4, street 4, 4
eugeniyaromanov
Contributor III
Contributor III
Author

Hello Anil!

Thanks for attention to my question!

I put the result table I want to have in previous message.

eugeniyaromanov
Contributor III
Contributor III
Author

And I wand to do it in chart.

ahaahaaha
Partner - Master
Partner - Master

Hi,

As it looks like you to process register CRM in 1C. As an variant, there are commas in the address, and there is no address in the e-mail address.

sunny_talwar

May be like this:

LOAD ...

FROM ...

Where not WildMatch(Text, '*@*') or not WildMatch(Text, '*;*');

But what is the goal? Is to create a table like this

Name, Email, Phone, Address?

There might be a better way to do this if Contact type is a dimension in your database

eugeniyaromanov
Contributor III
Contributor III
Author

Yes

It is from 1C, how did u guess? ))

Good idea with comas, but address sometimes can be mmm... it can be only city, or index or smth, so I don't know how to do it (

ahaahaaha
Partner - Master
Partner - Master

In my opinion commas 1C puts itself. The address is filled in by template. Now I will clarify with our specialists.