Setting File as: attribute for contacts -- mass import I am still trying to import 1,800 contacts for one of my users. His address book has many, many records without a name; only a company field. Is there a way on import or via SOAP or Rest to set the File As: attribute of these addresses to be "Company", rather than "Last, First"? It would sure help tidy up his addressbook. TIA. |
Change the "fileAs" value You'll want to set the "fileAs" attribute on the relevant contacts to 3 ("Company"). Don't change the other contacts! The easiest way to do that is via SOAP. Here's some sample SOAP that should be roughly correct; make sure to test before production! Code: <soap:Body> |
hm... Thanks -- I can use that. But (feeling stupid) where is the documentation for the fileAs Attribute and company = 3? I checked the docs and the SVN tree stuff documenting SOAP before I wrote the email. Did I just miss it? Or is your documentation of the SOAP API missing some details still? TIA. |
May not be documented there... You may have to look at the server source files in Subversion to find the relevant info, I'm afraid. For the record, here are the 8 supported numerical values for the "fileAs" field: Code: 52 /** "File as" setting: <code>Last, First</code> */(Note that the web client may not support value FA_EXPLICIT yet; this type of "fileAs" is not completely numeric but instead looks like "8:foo bar baz".) |
Okay -- how do I craft SOAP SearchRequest Think I can do this, if I can figure out how to write a SearchRequest for attribute lastName is missing -- How do I write the query element of SearchRequest? I want something like this: Code: <soap:Body> |
Don't think that's possible yet I don't think you can do a SearchRequest on individual contact fields yet, but you can do a GetContactsRequest and fetch only the "lastName" field. That should work, right? |
Hm -- So I suppose I get id and last_name for all contacts and then based on that output, fix the DisplayGroup attribute only for the contacts who have no last_name field? Okay -- will give that a try... |
| All times are GMT -7. The time now is 03:07 AM. |