chnovo7 / wordpress-custom-content-type-manager

Automatically exported from code.google.com/p/wordpress-custom-content-type-manager
0 stars 0 forks source link

Override Distinct options/values when "Alternate Input" is checked. #541

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
I use "Alternate Input" with a SQL query like you suggest on help:
SELECT post_title, ID
FROM [+table_prefix+]posts
WHERE post_type = 'wpsc-product'

But ID isn't saved in db, it only saves the "post_title" field.
Looking on the custom field box (in a new post linked to that custom field) in 
the input value only the "Post title" appears.

Thanks

Original issue reported on code.google.com by r...@wmr.it on 10 Feb 2014 at 12:35

GoogleCodeExporter commented 8 years ago
When you do this, the checkbox for "Distinct options/values? " still applies -- 
once you check that, the field (and the data saving) will behave in the way you 
want.

Original comment by ever...@fireproofsocks.com on 10 Feb 2014 at 5:25

GoogleCodeExporter commented 8 years ago

Original comment by ever...@fireproofsocks.com on 10 Feb 2014 at 5:29

GoogleCodeExporter commented 8 years ago
I didn't check "distincti options/values" but I think that "sql" setting 
overwrite every other setting.

Original comment by r...@wmr.it on 10 Feb 2014 at 5:40

GoogleCodeExporter commented 8 years ago
Yes: that's why I changed this from a bug to a feature request.  Subscribe to 
the ticket if you want updates.  For now, check the "Distinct options/values" 
box.

Original comment by ever...@fireproofsocks.com on 10 Feb 2014 at 5:42

GoogleCodeExporter commented 8 years ago
Committed revision 854914.

Original comment by ever...@fireproofsocks.com on 10 Feb 2014 at 5:51

GoogleCodeExporter commented 8 years ago
Thanks, with "distinct options/values" it works good. 
Maybe a good new feature an option to save in custom field an array with 
"label/id".

Original comment by r...@wmr.it on 11 Feb 2014 at 9:38