Highlighted

AutoSuggest Issue

New Here ,
Feb 24, 2016

Copy link to clipboard

Copied

We just upgraded to CF 11 from CF 9 and since the upgrade a custom built AJAX search feature does not work correctly- the SQL works as expected, and running AJAX debugger outputs the expected returned values yet when i start to type the auto suggest does not populate the correct information

For example on CF 9 if i search Form i am returned over a dozen results that either start, end , or have the word form in them, in CF 11 i get nothing back- i feel like this has to be a issue with the autosuggest as the debugger is returning the values, but not displaying the output

Thank you!

cf119.PNG

below is the code and the debug:

AJAX DEBUGGER - CF 11

info:http: Invoking CFC: /LinksFinder.cfc , function: GetURL , arguments: {"search":"form"}

info:http: CFC invocation response: //" Risk Downtime Form,2015 Plan Information,901 Upgrade Information,Accessing ESS From Home,Appeal Form,Authorization for Disclosure of Protected Health Information,Benefit Enrollment Tip Sheet,Benefits Information,Best Of Southwest FAQ,Blood Transfusion Documentation,Blue Sky Green Fields,Cafeteria Menu,CarePoints Information,CDC Parasitic Reference,Conference Room Instructions,Conference Room Schedule,Contact Info \/ Privileges,Corp Compliance FAQs,Definitions,Drug Information Service,Emergency Department Forms,Employee Mammogram Form,Employee Self Appraisal,Employee Self Service,Equipment Reference Material,ESA REMS Form,Exit Interview Information,Exposure Forms Non-Associate,Falls Incident Investigation,FDA MedWatch Voluntary Reporting Form,Fisher Scientific,Flu Clinic Dates,For Patients,FT Exempt PAM Instructions,FT Exempt PAM Tip Sheet,Glossary of Terms,Guidelines for Establishing A New Cost Center,Health Information Release Form,Hospital Forms,Hospital Formulary - Formulary,IBS Office Supplies,Infection Control Manual,Infection Control Manual,Info Sheets,Interventional Preferences Maintenance,IPOC - Interdisciplinary Plans of Care,JC Findings,Kronos System Access Form,Leave\/Disability Information For Employees,LifeWorks,Manager Self Service Manual,Med Watch FAQs,Medical Staff Monthly Calendar,Non-Grandfathered Healthcare Reform Preventive Services,Office Compatibility Pack,Order Form - Administrative,Order Form - Clinical,Order Form - Physical Therapy,Order Uniforms,OrderSet Reference Guides,PAH Patient Placement Flow Control,Performance Manager,Phase 1 Wayfinding Map,Phase 2 Wayfinding Map,Phase 3 Wayfinding Map,Premier Safety,Prescription Refill,Printing Certificate,Professional Development,Pt Relations Downtime Form,Quality Flyers,Quick Reference,Reference Guide - Investigation,Reference Guide - Pt Relations,Reference Guide - Reporting,Reference Manuals,Referral Bonus Listings,Registration Information,Report Infection Control Infraction\/Concerns,Report Violation \/ Follow Up,Resident City Tax Form,Safety Climate Survey,Safety Manual Policies,Scheduling Change Form,Scheduling Encumbrance Form,Seidman Forms,SSO Self-Service,Standards of Performance,TIGR StaffConnect,UH Radiology Radflow,W9 Form,Workforce Timekeeper"

info:http: HTTP GET /LinksFinder.cfc?method=lookupLink&_cf_ajaxproxytoken=&returnFormat=json&argumentCollection=%7B%22search%22%3A%22f%22%7D&_cf_nodebug=true&_cf_nocache=true&_cf_rc=0

info:http: Invoking CFC: /LinksFinder.cfc , function: lookupLink , arguments: {"search":"f"}

info:widget: Fetching data for autosuggest id: PageName , current value: 'f'

info:LogReader: LogReader initialized

info:global: Logger initialized

CF 11 CODE

<td colspan="2"><!---Quick Search Feature ---><cfform name="LinkFinder" method="post" format="html">

      <cfinput type="Text"

  name="PageName"

         id="PageName"

  autosuggest="cfc:LinksFinder.lookupLink({cfautosuggestvalue})"

  maxlength="250"

  style="background-color:C1E0FF;"

         size="19">

      <input type="submit" name="Go" id="Go" value="Go" OnClick="Jump(); return false;" >

      <cfinput type="text" name="test" bind="cfc:LinksFinder.GetURL({PageName})">

      </cfform><!--- End of Quick Search ---></td>

CFC FILE

<cfcomponent>

<cfset ds="Links">

<!--- Function to get the web pages from the database. Used for the Auto-Suggest --->

<cffunction name="lookupLink"

  access="remote"

  returntype="String"

  hint="Lookup method for Ajax auto-suggest">

  <cfargument name="search"

  type="any"

  required="false"

  default="">

<cfset var data="">

<cfquery datasource="#ds#" name="data">

SELECT PageName

FROM dbo.IntranetUpdated

WHERE UPPER(PageName) LIKE UPPER('%#ARGUMENTS.search#%')

ORDER BY PageName

</cfquery>

<cfreturn ValueList(data.PageName)>

</cffunction>

<!--- Function to get the URL from the database. Populates the hidden text box on the page and used in Javascript to go to the uRL --->

<cffunction name="GetURL"

  access="remote"

  returntype="String"

  hint="Gets URL of Page - used for binding">

  <cfargument name="search"

  type="any"

  required="false"

  default="">

<cfset var data="">

<cfquery datasource="#ds#" name="data">

SELECT URL, PageName

FROM dbo.IntranetUpdated

WHERE UPPER(PageName) LIKE UPPER('%#ARGUMENTS.search#%')

ORDER BY URL

</cfquery>

<cfreturn data.URL>

</cffunction>

</cfcomponent>

Views

322

Likes

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

AutoSuggest Issue

New Here ,
Feb 24, 2016

Copy link to clipboard

Copied

We just upgraded to CF 11 from CF 9 and since the upgrade a custom built AJAX search feature does not work correctly- the SQL works as expected, and running AJAX debugger outputs the expected returned values yet when i start to type the auto suggest does not populate the correct information

For example on CF 9 if i search Form i am returned over a dozen results that either start, end , or have the word form in them, in CF 11 i get nothing back- i feel like this has to be a issue with the autosuggest as the debugger is returning the values, but not displaying the output

Thank you!

cf119.PNG

below is the code and the debug:

AJAX DEBUGGER - CF 11

info:http: Invoking CFC: /LinksFinder.cfc , function: GetURL , arguments: {"search":"form"}

info:http: CFC invocation response: //" Risk Downtime Form,2015 Plan Information,901 Upgrade Information,Accessing ESS From Home,Appeal Form,Authorization for Disclosure of Protected Health Information,Benefit Enrollment Tip Sheet,Benefits Information,Best Of Southwest FAQ,Blood Transfusion Documentation,Blue Sky Green Fields,Cafeteria Menu,CarePoints Information,CDC Parasitic Reference,Conference Room Instructions,Conference Room Schedule,Contact Info \/ Privileges,Corp Compliance FAQs,Definitions,Drug Information Service,Emergency Department Forms,Employee Mammogram Form,Employee Self Appraisal,Employee Self Service,Equipment Reference Material,ESA REMS Form,Exit Interview Information,Exposure Forms Non-Associate,Falls Incident Investigation,FDA MedWatch Voluntary Reporting Form,Fisher Scientific,Flu Clinic Dates,For Patients,FT Exempt PAM Instructions,FT Exempt PAM Tip Sheet,Glossary of Terms,Guidelines for Establishing A New Cost Center,Health Information Release Form,Hospital Forms,Hospital Formulary - Formulary,IBS Office Supplies,Infection Control Manual,Infection Control Manual,Info Sheets,Interventional Preferences Maintenance,IPOC - Interdisciplinary Plans of Care,JC Findings,Kronos System Access Form,Leave\/Disability Information For Employees,LifeWorks,Manager Self Service Manual,Med Watch FAQs,Medical Staff Monthly Calendar,Non-Grandfathered Healthcare Reform Preventive Services,Office Compatibility Pack,Order Form - Administrative,Order Form - Clinical,Order Form - Physical Therapy,Order Uniforms,OrderSet Reference Guides,PAH Patient Placement Flow Control,Performance Manager,Phase 1 Wayfinding Map,Phase 2 Wayfinding Map,Phase 3 Wayfinding Map,Premier Safety,Prescription Refill,Printing Certificate,Professional Development,Pt Relations Downtime Form,Quality Flyers,Quick Reference,Reference Guide - Investigation,Reference Guide - Pt Relations,Reference Guide - Reporting,Reference Manuals,Referral Bonus Listings,Registration Information,Report Infection Control Infraction\/Concerns,Report Violation \/ Follow Up,Resident City Tax Form,Safety Climate Survey,Safety Manual Policies,Scheduling Change Form,Scheduling Encumbrance Form,Seidman Forms,SSO Self-Service,Standards of Performance,TIGR StaffConnect,UH Radiology Radflow,W9 Form,Workforce Timekeeper"

info:http: HTTP GET /LinksFinder.cfc?method=lookupLink&_cf_ajaxproxytoken=&returnFormat=json&argumentCollection=%7B%22search%22%3A%22f%22%7D&_cf_nodebug=true&_cf_nocache=true&_cf_rc=0

info:http: Invoking CFC: /LinksFinder.cfc , function: lookupLink , arguments: {"search":"f"}

info:widget: Fetching data for autosuggest id: PageName , current value: 'f'

info:LogReader: LogReader initialized

info:global: Logger initialized

CF 11 CODE

<td colspan="2"><!---Quick Search Feature ---><cfform name="LinkFinder" method="post" format="html">

      <cfinput type="Text"

  name="PageName"

         id="PageName"

  autosuggest="cfc:LinksFinder.lookupLink({cfautosuggestvalue})"

  maxlength="250"

  style="background-color:C1E0FF;"

         size="19">

      <input type="submit" name="Go" id="Go" value="Go" OnClick="Jump(); return false;" >

      <cfinput type="text" name="test" bind="cfc:LinksFinder.GetURL({PageName})">

      </cfform><!--- End of Quick Search ---></td>

CFC FILE

<cfcomponent>

<cfset ds="Links">

<!--- Function to get the web pages from the database. Used for the Auto-Suggest --->

<cffunction name="lookupLink"

  access="remote"

  returntype="String"

  hint="Lookup method for Ajax auto-suggest">

  <cfargument name="search"

  type="any"

  required="false"

  default="">

<cfset var data="">

<cfquery datasource="#ds#" name="data">

SELECT PageName

FROM dbo.IntranetUpdated

WHERE UPPER(PageName) LIKE UPPER('%#ARGUMENTS.search#%')

ORDER BY PageName

</cfquery>

<cfreturn ValueList(data.PageName)>

</cffunction>

<!--- Function to get the URL from the database. Populates the hidden text box on the page and used in Javascript to go to the uRL --->

<cffunction name="GetURL"

  access="remote"

  returntype="String"

  hint="Gets URL of Page - used for binding">

  <cfargument name="search"

  type="any"

  required="false"

  default="">

<cfset var data="">

<cfquery datasource="#ds#" name="data">

SELECT URL, PageName

FROM dbo.IntranetUpdated

WHERE UPPER(PageName) LIKE UPPER('%#ARGUMENTS.search#%')

ORDER BY URL

</cfquery>

<cfreturn data.URL>

</cffunction>

</cfcomponent>

Views

323

Likes

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
Feb 24, 2016 0
Most Valuable Participant ,
Feb 24, 2016

Copy link to clipboard

Copied

Isn't this a duplicate of this thread from a few days ago (and that you followed up on earlier this morning): Cffunction not working properly since CF 11 upgrade

Likes

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
Reply
Loading...
Feb 24, 2016 0
LEGEND ,
Feb 24, 2016

Copy link to clipboard

Copied

My first recommendation would be to avoid using CFINPUT (or CFFORM) and use standard HTML inputs.  You can use a JavaScript or jQuery AJaX function to get the real-time updates from the database.

And, yeah, Carl Von Stetten‌ is right.  You really shouldn't post multiple requests for the same issue.  Bad form (pun intended).

V/r,

^_^

Likes

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
Reply
Loading...
Feb 24, 2016 0