Support has been upgraded!
The Support Forum is closed. Not to worry! Providing the top quality support you expect and we're known for will continue! We're not ending support, just changing where you submit requests. This will provide you with the best experience possible.
Premium Support
Have you purchased an addon for Connections such as one of our premium templates or extensions with a valid license and you need help?
Please open a Support Ticket in your user account.
Free Support
Are you using the free Connections plugin? Don't worry, you are still very important to us! We are still providing you with the same high quality support that we're known for.
Please open a new support topic in the WordPress support forums for Connections.
Tagged: 8.1.4, csv import, entry type, individual, order_by, organization, slim plus
- This topic has 11 replies, 4 voices, and was last updated 11 years, 9 months ago by
Steven Zahm.
-
AuthorPosts
-
10/14/2014 at 12:22 pm #307000
paul wagner
Participant- I’m using the latest installation 8.1.4 of Connections and 1.0.4 of CSV Import.
When I import a CSV file with Entry Type = Organization, my Slim Plus template doesn’t seem to see it and all entries are still set to Individual. What am I missing? - Can I reset an entry to Organization? I don’t see the dropdown for that radio button.
- Once I change it to Organization, I’d of course like entries sorted and displayed by that, but perhaps that will all happen automagically?
10/15/2014 at 11:06 am #307111Steven Zahm
Keymaster@ paul
re: I’m using the latest installation 8.1.4 of Connections and 1.0.4 of CSV Import.
When I import a CSV file with Entry Type = Organization, my Slim Plus template doesn’t seem to see it and all entries are still set to Individual. What am I missing?
Sorry, not sure. Could you explain what you mean by; “Slim Plus template doesn’t seem to see it“?Templates have nothing to do with what type an entry is, so I’m a little confused.
Can you attach a copy of the CSV file you imported? I’m guessing you imported a CSV file with a
Entry Typecolumn set toorganization, yes? But it sounds like you might have also had the fields forFirst NameandLast Nameset and mapped, yes? This would force the entry type back toindividualbecause an organization entry can not have a first and last name.re: Can I reset an entry to Organization? I don’t see the dropdown for that radio button.
Yes, when you edit an entry, you should have the option to change the entry type. The option will on top of the same netabox where theUpdatebutton is.re: Once I change it to Organization, I’d of course like entries sorted and displayed by that, but perhaps that will all happen automagically?
Regardless of the entry type, by default the entries are sorted alphabetically by last name if the entry is an individual and organization name if the entry is an organization. Both entry types can be in the same list. Hope that makes sense.10/25/2014 at 12:17 am #308079Paul Wagner
GuestOK, after I segregated the organizations, departments and contact names, I did the import.
But now, there is only one entry per organization and the organization appears multiple times. I wanted multiple entries to appear under an organization when one drops down the organization name. It does the user no good to guess which names appear under one of multiple organizations.
Is there anything that can be done about this?
Thanks, Paul
10/25/2014 at 9:19 am #308086Olivier Moreau
Participant“you might have also had the fields for First Name and Last Name set and mapped, yes? This would force the entry type back to individual because an organization entry can not have a first and last name.”
Why not?
“I’m guessing you imported a CSV file with a Entry Type column set to organization”
If you want to force importing Organization that would override the automatic selection based on “Last Name”. I just tested it and it’s unfortunately not working. I’m going to click 200 times to change records one by one before importing :-(
The best would be to have a relational database with 1 Org. to n Ind.
-
This reply was modified 11 years, 9 months ago by
Olivier Moreau.
10/25/2014 at 9:51 am #308088Olivier Moreau
ParticipantI took a look at the code (that’s the nice thing with open source) and it seems the selection is done by :
Connexion\Plugins\connections-csv\submenu\csv.php
I modified line 253 and all records imported as Organizations :)
BUT unfortunately I lost all the last names :(Please help…
10/25/2014 at 10:41 am #308092Steven Zahm
Keymaster@ Paul
re: But now, there is only one entry per organization and the organization appears multiple times… Is there anything that can be done about this?
In short, no, maybe, Connections does not create relationships between entries. It sounds to me like you’re trying to import individuals that are within a org/dept and not a list of organizations. Import your list as individuals with first and last names, do not make them contact names because that is completely different. Make sure each individual has their org and dept fields set too.Now, go to the Connections : Settings admin page and click the advanced tab. Enable the link options for org and dept.
You’ll still be presented with a list of individuals but their org and dept names under their names will be links. When a user clicks on those links the results will be filtered by the org or dept the user clicked.
There’s a lot of assumptions I’m making … but, I hope it helps get you closer to what you’re trying to achieve.
10/25/2014 at 11:16 am #308093Steven Zahm
Keymaster@ Olivier
re: because an organization entry can not have a first and last name… Why not?
I’ve never seen an organization (business) that had a first and last name with the possible exception sole proprietorship, even then many operate under a org (business) name. So, Joe Smith and Bros Plumbing would still be an org name even though Joe Smith is within the org (business) name. Joe Smith would be its contact name, not the org name. So, with that said, an org can not have a first and last name and it will not be saved.re: If you want to force importing Organization that would override the automatic selection based on “Last Name”. I just tested it and it’s unfortunately not working.
Sounds like you’re using an old version of the CSV Import.re: The best would be to have a relational database with 1 Org. to n Ind.
Sure, if there were enough of a demand for such a structure. From my experience in supporting Connections that’s a level of complexity that would be lost on most and not really even needed to meet their needs.@re: Connexion\Plugins\connections-csv\submenu\csv.php I modified line 253
Looks like you’re using CSV Import 0.8. That’s pretty old. The current version is 1.2. You should really update. You can download it from your purchase history.Updating will not change the entry type logic, if anything it is a bit more explicit:
/* * Attempt to determine the entry type by the data supplied in the CSV * If the type is not supplied, it must be either these values: * * * individual * * organization * * If it can not be determined by the supplied data, unset the row. */ // Valid entry types. $entryTypes = array( 'individual', 'organization' ); $entryType = isset( $row->entry_type ) && ! empty( $row->entry_type ) ? strtolower( $row->entry_type ) : NULL; // Set the entry type if it was supplied in the CSV file. // If the entry type was not supplied, attempt to guess it from the supplied data. if ( 'individual' == $entryType && ( ( isset( $row->first_name ) && ! empty( $row->first_name ) ) && ( isset( $row->last_name ) && ! empty( $row->last_name ) ) ) ) { $entry->setEntryType( 'individual' ); } elseif ( 'organization' == $entryType && ( isset( $row->organization ) && ! empty( $row->organization ) ) ) { $entry->setEntryType( 'organization' ); } elseif ( ( isset( $row->first_name ) && ! empty( $row->first_name ) ) && ( isset( $row->last_name ) && ! empty( $row->last_name ) ) ) { $entry->setEntryType( 'individual' ); } elseif ( isset( $row->organization ) && ! empty( $row->organization ) ) { $entry->setEntryType( 'organization' ); }re: unfortunately I lost all the last names
You can force entries to be imported to a specific type, as explained, but an org entry can not have a first and last name, the data will not be saved.To me, and I’m making assumptions here, it sounds like you’re really importing individuals that are part of an org/dept, not the other way around.
Import your csv file as individuals with first and last names, do not make them contact names because that is completely different. Make sure each individual has their org and dept fields set.
Now, go to the Connections : Settings admin page and click the advanced tab. Enable the link options for org and dept.
You’ll still be presented with a list of individuals but their org and dept names under their names will be links. When a user clicks on those links the results will be filtered by the org or dept the user clicked.
I hope it helps get you closer to what you’re trying to achieve.
10/25/2014 at 9:41 pm #308109Olivier Moreau
ParticipantHi Steven
Thanks for your lengthy reply.
I didn’t realize I was not up to date :(
I’m setting up a database for environmental associations.
We are talking about organizations, not individuals. Yet the main contact in the association is very useful.
Well I’ll put these names in some other fields if there’s no other way.10/27/2014 at 9:08 am #308162Steven Zahm
Keymaster@ Olivier
re: We are talking about organizations, not individuals. Yet the main contact in the association is very useful.
If that is the case, then you want to map the first and last name fields to the contact first name and the contact last name fields.If I have not asked and you have a moment, I would truly appreciate a review as they really do make a difference. Many thanks in advance!
http://wordpress.org/support/view/plugin-reviews/connections10/27/2014 at 3:58 pm #308281Olivier Moreau
ParticipantOK I see, I just took the wrong fields : Last_Names instead of Contact_Last_Names.
Good because I realize I have to redo the all import because the category fiel is not OK…I cannot find the spreadsheet used as a model for import. I got one from 2013 but it’s probably not complete. There is no column “entry-type” for instance.
Thanks in advance
- I’m using the latest installation 8.1.4 of Connections and 1.0.4 of CSV Import.
-
AuthorPosts
You cannot reply to this support topic. Please open your own support topic.
