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!
Not sure I understood...
The mail goal is to have a profile for a person, where all personal information is.
I've got a table where everything is messed up, address, phone and mail.
And I need to separate it in a chart.
In one field i need to show phones, in other address, in third e-mail.
If it's not there I need it to be like '-'.
Yes, the representation of address 1С does it by itself.
Can you share the expected output from your sample above... and this is needed in the front end chart?
From data at first table i need to get:
Name | Address | Phone | |
---|---|---|---|
1 | town 1, street 1, 1 | 12345678 | bla@bla.com |
2 | - | - | bla1@bla.com |
3 | town 3, street 3, 3 | 23456781 | - |
4 | town 4, street 4, 4 | 34567812;45678123 | bla2@bla.com |
How to handle with phone and e-mail I figured ( not sure I did it properly, but anyway it works)
I don't know how to handle with address.
It worked!
Sunny, at the end I did it with comas, in my data address always contains a coma,
so i did it:
MinString( if(wildmatch(Text(Contact),'*,*'), Contact))
Thanks for help!
Hi Sunny,
The program developer 1C in the ContactType field value Adress is assigned for both the usual address and for the e-mail address. That is the task of their separation. It would be more logical to make Adress1 for a regular address and Adress2 for an e-mail, but ... now like this.
Regards,
Andrey
Thanks for helping!
After all it was so simple
I appreciate it!
I'm glad I could help.