Currently the way finder choices lists (select/radios/checkbox/autocomplete) work is by running a query against all the candidate nodes, and picking out the values that have been stored in the database.

That's perfect for the reasons I needed this module for, but it falls apart on a lot of larger sites that don't really need this ability.

We need some way to grab the list of choices from another source. Hopefully Views does this somehow somewhere and we can use their information. At the very least there should be a way to supply your own key|values or PHP or something.

I can imagine a new setting like:

Choices lists
(*) Build from candidate entities
( ) Get from Views (???)
( ) Use 'available options' below.

Available options
__________________________
|
|
|_________________________
Enter key|value pairs or some PHP or whatever

CommentFileSizeAuthor
#2 finder-choices-style-1.patch8.62 KBdanielb

Comments

danielb’s picture

Version: 7.x-1.x-dev » 7.x-2.x-dev
danielb’s picture

StatusFileSize
new8.62 KB

I kinda made an attempt at this and here's the patch, but not worth testing as it doesn't handle autocomplete keyword matching... thats where I hit a dead end. I don't really want to replicate autocomplete matching in php code.
So I need another solution for implementation.
I was thinking maybe a temporary table created for the finder element, at the time of saving the settings and then it updates with cron. That's still not a complete solution, you can't just plug a table into the views finder to get this done. A function to perform a custom query on this table perhaps?

danielb’s picture

Yes I think that's the way to go, just a lot of messing around with creating and deleting tables when elements are created/deleted, and when the module is uninstalled. What a hassle.

danielb’s picture

Apparently optimisations are forthcoming to views which will vastly improve the default behaviour of finder, apart from the views maintainer getting sandy and telling me to quit drupal. #1234592: Provide a secondary DISTINCT option that doesn't add the base field

danielb’s picture

Status: Active » Fixed

I've added some experimental features to allow manual configuration of choices.
If there are any issues please start a support request or bug report.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

Anonymous’s picture

Issue summary: View changes

loggy log