Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I have a table:
Name | ContactType | Contact |
---|---|---|
1 | Phone | 12345678 |
1 | Address | town 1, street 1, 1 |
1 | bla@bla.com | |
2 | bla1@bla.com | |
3 | Phone | 23456781 |
3 | Address | town 3, street 3, 3 |
4 | Phone | 34567812 |
4 | Phone | 45678123 |
4 | Address | town 4, street 4, 4 |
4 | Address | town 5, street 5, 5 |
4 | bla2@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!
In my opinion commas 1C puts itself. The address is filled in by template. Now I will clarify with our specialists.
I am not completely sure what you are looking to get here? Would you be able to elaborate a little?
From this table, What would be the result you want to see. And you want to do it in Script / UI
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:
Name | Address |
---|---|
1 | town 1, street 1, 1 |
2 | - |
3 | town 3, street 3, 3 |
4 | town 4, street 4, 4 |
Hello Anil!
Thanks for attention to my question!
I put the result table I want to have in previous message.
And I wand to do it in chart.
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.
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
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 (
In my opinion commas 1C puts itself. The address is filled in by template. Now I will clarify with our specialists.