• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

cfbind within a cfselect - How to have multiple values in display propery?

Guest
Aug 05, 2010 Aug 05, 2010

Copy link to clipboard

Copied

I am binding a cfselect tag to a CFC, it's working as expected but I want to have more than one value populating the display="" part of the 2nd cfselect.The CFC returns a query of company information based off of the activty_id sent in.

This is what I currently have (roughly):

<cfajaxproxy cfc="mysite.templates.cfc.companies">

(this is working fine)

<cfselect name="activity_id" bind="cfc:mysite.templates.cfc.companies.fncActivity()" display="activity_name" value="activity_id" bindonload="yes" />

Here's where I want to display more than one value. This works as shown below but I want display="company_name company_city company_state" in the cfselect instead.

<cfselect name="company_id" bind="cfc:mysite.templates.cfc.companies.fncCompany({activity_id})" display="company_name" value="company_id" />

In debugging the CFC I am getting this returned:

Bind failed for select box company_id, columns matching the value or  display attributes specified on the cfselect tag are not present in the  query

Is this possible?

TOPICS
Advanced techniques

Views

1.0K

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Aug 05, 2010 Aug 05, 2010

Copy link to clipboard

Copied

The display attribute can only reference a single column. Concatentate the values together under a single column in your query. Then use the new column name in your bind.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 06, 2010 Aug 06, 2010

Copy link to clipboard

Copied

LATEST

Gotcha, thanks much.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources
Documentation