CF9 - cfinvoke seems to search scopes in different order

We came across this in a legacy app when it was moved to CF9 -- a cfinvoke that had always worked in previous versions seemed to stop working whereas invoking the same method using function notation returned the right results.
I've only tested the following on CF9 but it demonstrates the problem we had on CF9 which did not exist in previous versions.
This uses cfinvoke and function notation to call the same method and they return two different results -- cfinvoke returns an emptry struct, the function notation returns a correctly populated struct.
Application.cfm:
<cfapplication name="cf9test"
    sessionmanagement="Yes"
    setclientcookies="Yes"
    sessiontimeout="#createTimeSpan(0,0,60,0)#"
    applicationtimeout="#createTimeSpan(1,0,0,0)#">
test.cfc:
<cfcomponent output="true">
    <cffunction name="func1" returntype="struct">
        <cfargument name="stObject" required="no" default="#structNew()#">
        <cfinvoke component="#this#"
            method="func3"
            returnVariable="stObject"><!--- Returns into Variables scope --->
        <!--- Returns the empty struct in arguments.stObject --->   
        <cfreturn stObject/>
    </cffunction>
    <cffunction name="func2" returntype="struct">
        <cfargument name="stObject" required="no" default="#structNew()#">
        <cfscript>
            stObject = func3(); // Returns into Arguments scope
        </cfscript>
        <cfreturn stObject/>
    </cffunction>
    <cffunction name="func3" returntype="struct">
        <cfscript>
            stTest = structnew();
            stTest.foo = "blah";
            stTest.blah = "bingo";
        </cfscript>
        <cfreturn stTest />
    </cffunction>
</cfcomponent>
index.cfm:
<cfinvoke component="cf9test.test"
        method="func1"
        returnVariable="stObject">
Return from the cfinvoke:        
<cfdump var="#stObject#">
<cfset structClear(stObject)>
<br />
<cfinvoke component="cf9test.test"
        method="func2"
        returnVariable="stObject">
Return from the function       
<cfdump var="#stObject#">

I don't see the problem. All you had to do to avoid ambiguity was to var the variables in the methods and to give them distinct names. For example
<cfcomponent output="false">
    <cffunction name="func1" returntype="struct" output="false">
        <cfargument name="stObject" required="no" default="#structNew()#">
        <cfset var object1 = structNew()>
        <cfinvoke component="#this#"
            method="func3"
            returnVariable="stObject1">
        <cfreturn stObject1/>
    </cffunction>
    <cffunction name="func2" returntype="struct" output="false">
        <cfargument name="stObject" required="no" default="#structNew()#">
        <cfscript>
            var object2 = structNew();
            stObject2 = func3();
        </cfscript>
        <cfreturn stObject2/>
    </cffunction>
    <cffunction name="func3" returntype="struct">
        <cfscript>
            var stTest = structnew();
            stTest.foo = "blah";
            stTest.blah = "bingo";
        </cfscript>  
        <cfreturn stTest />
    </cffunction>
</cfcomponent>

Similar Messages

  • Multipe AD yet Single Search Scope - CUCM/CUC

    Hi all,
    Wondering  if anyone has had experience integrating mutiple ADs (different forests  and domains) with a single CUCM. The CUCM has a limit of 5 ldap  directories but even more impotantly only a single search scope.
    The  following document describes using ADLDS which would solve the multiple  AD scenario but would this solve the single search scope issue as well  (same goes for CUC)?
    http://www.cisco.com/en/US/products/sw/voicesw/ps556/products_configuration_example09186a0080b2b103.shtml
    Any pointers appreciated.
    Thanks,
    Kamran

    Hi Chris,
    Thanks tip, thats the solution i was alluding to above. It would solve the 5 ldap directory limit issue but I am not clear about the single search scope limitation.
    From my testing, it seems that the LDAP would sync multiple ADs (in their own domains) into a separate partition - will try to get some screenshots. So my questions are:
    1) Is this correct? would ADLDS sync separete ADs (in separate domains) in a separate partition? I am basing this on an assumption we will need to run the ADLDS sync with all ADs separately.
    2) Where do we point our search scope on the ADLDS so that it syncs all ADs sync'ed to the ADLDS?
    Thanks,
    Kamrna

  • How to limit the search scope in single site collection for SP2013?

    On our SP2013 farm, there is one web application and 4 site collections under it. At the beginning I was trying to setup 4 different "Content Sources" but Sharepoint warn me that I can only setup 1 source per web application.
    I don't want user search at site collection A get search result from B, C and D. Also I like to use continuous crawling. What is the best practice to achieve? Thanks.

    Hi,
    Please check this links
    http://social.technet.microsoft.com/Forums/sharepoint/en-US/615edaa8-f522-4496-a57e-9681d83b0ac3/how-to-create-content-type-search-scope-depending-on-each-site-collection?forum=sharepointdevelopmentprevious
    http://sadomovalex.blogspot.in/2013/08/how-to-limit-search-results-to-current.html
    Please remember to click 'Mark as Answer' on the answer if it helps you

  • Site Collection level Search Scopes after Upgraded to 2013

    In SharePoint 2010 we have  good amount of site collection level search scopes and it has been heavily used in search scope down.
    Please correct me if any of my below statement is wrong
    1.After migration these scopes cannot be used and it will not appear in search drop down.
    2.Only opition I have is to create Result Source and Configure search navigation at Site Level?
    3.For Result Sources to appear in drop down I need to have individual search page for every custom result source.
    I would really appreciate your inputs
    Thank you
    Vijay

    1. Usually 2010 Search Scopes can be used after migrating to 2013.  What you can't do is edit them or create new ones.  However, I've had mixed luck with them.  About 75% seem to work, with the rest being broken beyond repair.
    2. If the migrated scope doesn't continue to work your only real option is a REsult Source.  To add them to the dropdown you will need to configure the navigation at the Site level.
    3. Result sources can re-use result pages used by other Result sources.  You need a Result source for each entry, but that result source may point to the same page as another result source.
    Paul Stork SharePoint Server MVP
    Principal Architect: Blue Chip Consulting Group
    Blog: http://dontpapanic.com/blog
    Twitter: Follow @pstork
    Please remember to mark your question as "answered" if this solves your problem.

  • HT204053 Can I search or locate different iPhone devices using one apple ID?

    Hello!
    Can I search or locate different iphone devices using one apple I.D.?
    Thanks!

    You can only use Find My iPhone for accounts that you can log into.  If you and your neighbor have different IDs and you only know your ID, than you can only track devices attached to your account.

  • Search scopes taking long time to load SharePoint 2010

    Hi!
    It takes very long time (more than 5-10 mins) for the Search Scopes page to load. This is very annoying and proves to be very much NON-productive while working on search related tasks.
    Please help if you came across any such issue.
    Thanks,
    Owens G. Jesse

    Hi Owens ,
    According to your description, my understanding is that only your Search Scopes page loads very slowly.
    For your issue , you can enable Developer Dashboard for SharePoint 2010 with PowerShell first.
    With Developer Dashboard, you can find out where the Search Scopes page loading  time was spent at server side.
    Reference:
    http://blogs.technet.com/b/patrick_heyde/archive/2009/11/16/sharepoint-2010-enable-using-developer-dashboard.aspx
    Please inform me freely if you have any questions.
    Thanks

  • How to show only Indexes in Search Scope

    Hi All,
    Is it possbile to allow users to choose only Indexed in search scope.
    I tried editing the Search Options set, there i found that I can enable and disable search scope, but whn search scope is enabled both the Indexes and folders are visible.
    I want to show only Indexes to the user. How can I hide the folder options alone in the search scope?
    Thanks and Regards
    George

    Instead of using the Search Options set in the KM Search iView, use the Search Component Set.
    Create your own Search Component Set by going to <b>System Administration > System Configuration > Knowledge management > Content Management > User Interface > Search > Search Components</b>
    While creating the Search Component Set, Specify <b>Component for Search Options</b> as <u>search_input_indexes</u>.
    This should help you.
    Or you could do the following.
    In the Search Options set, Do the following.
    1) Uncheck <b>Enable Search Scope Selection</b>.
    2) Provide the various index names in <b>Search Index IDs (csv)</b>
    The above option would by default search the selected indexes for the search term and would not provide the user with the functionality of searching in folders.
    Pradeep.

  • How to merge two search button from different criteria

    How to merge two search button from different criteria
    this image show the question
    http://s24.postimg.org/4algthuj9/1111.jpg
    two different criteria for the same view and I need to merge it in one button as when I click
    on the button search result give from two criteria parameters

    You can!t using af:query. the af:query component comes as is. If you can't do it through the properties, you probably can't do it at all.
    As in your other thread, the way to go is to program your own search form. This way you can use a layout and functionality you like.
    For this you create a form with input fields for the values you are searching for, put them on hte page in a way you like and in the end by hitting on a button (e.g. called Search) map all inputfields to parameters of a service method you defined in your application module or VO. This service method then executes a view criteria returning all matches in the default iterator (just as if you had used af:query.
    Timo 

  • Search results are differed in Quick and candidate searches

    Hi Everyone,
    I am using ECC 6  EhP 5 system with Trex search 7.10.48.
    We are having a scenario where search is behaving differently in different places.
    We are able to find some  Locked  candidates in quick Search (ERC_C_QUICK_SEARCH_UI) as well as in Candidate Search.
    But as per standard behaviour the Locked candidates should not be able to search in Candidate Search.
    So how to restrict the Locked candidates to able to see in Candidate search.
    I tried SNOTE 1301016, i confused how to use that one.
    Please help if you have faced similar issues.
    Kind regards
    Chetan

    Hi Nicole,
    I am able to find one entry in IT5134, So exactly where we need to check for the attachment status.
    Below are the table entries
    MANDT:300 PLVAR :01     OTYPE:NA     OBJID: 50027289 SUBTY:0001     ISTAT:1 BEGDA: 17.03.2011 ENDDA: 31.12.9999     INFTY:5134     OTJID: NA50027289     AEDTM: 17.03.2011 UNAME: AMXJUE     ATT TYPE: 12 ATTACHMENT:1 LANGUAGE:EN    ATT HEADER: Juechter 2011     REC GUID:          ATT GUID:     
    Thanks for your help.          
    Kind regards
    Chetan

  • When the Wifi is connected, the iphone seems to search for some site and if firewall does not allow the access to that site, it disconnects the connection to Wifi. Can anyone help on this?

    When the Wifi is connected, the iphone seems to search for some site and if firewall does not allow the access to that site, it disconnects the connection to Wifi. Can anyone help on this?

    Hi SBEG2015,
    I'm sorry to hear you are having these issues with your iPhone. Based on your description of what has happened and the symptoms you are seeing, you may need to have your iPhone evaluated and/or serviced. You may find the following page helpful:
    Apple - Support - Service Answer Center
    Regards,
    - Brenden

  • I have two email accounts. Before the upgrade I was able to search them individually now it seems to search all emails by default. How can I search them separately.

    I have two email accounts. Before the upgrade I was able to search them individually now it seems to search all emails by default. How can I search them separately.

    I have the same issue - all inboxes merged into one.
    My Gmail account provides a number of subfolders like sent, drafts, own folders - many can be selected, but not the inbox.
    Another account type only provides the sent folder, this goes also for my iCloud account.
    I have an iPhone 5

  • Custom Search Scopes in SP2010

    Hi,
    I have created a shared search scope in the Central Administration. I am adding this scope to the Search Drop Down display group of my team site. I want the name of this search scope to be localized based on the user's preferred display
    language. How can I achieve this programmatically ?
    Out of box shared scopes like 'People' do get translated based on the user's preferred display language.

    Hi,
    In SharePoint 2013, Search Scopes has been replaced by the Result Sources. For your requirement, here is a workaround for your reference:
    http://www.brainlitter.com/2013/03/22/sharepoint-2013-search-scopes-are-gone-but-dont-fret/
    http://sergeyspoint.blogspot.com/2013/04/sharepoint-2013-and-search-scopes.html
    Thanks
    Patrick Liang
    Forum Support
    Please remember to mark the replies as answers if they
    help and unmark them if they provide no help. If you have feedback for TechNet
    Subscriber Support, contact [email protected]
    Patrick Liang
    TechNet Community Support

  • What is the Behavior.Navigation URL for creating navigation bar links for search scopes for security group and distribution groups?

    ...the search scope is used to subset the SGs and DGs. The search scope itself shows expected results. The search scope filter used is: /Group[Type='Security' or Type='MailEnabledSecurity'][(Domain = 'DomainX') or (Domain = 'DomainY')]
    Tried the following, with the GUID being the resource ID from the search scope for security groups:
    ~/identitymanagement/aspx/customized/CustomizedObjects.aspx?type=Group&searchtype=e8ed98b6-e299-4b8d-bfe5-e4b2adf1cd60
    ~/IdentityManagement/aspx/groups/Groups.aspx?type=Group&searchtype=e8ed98b6-e299-4b8d-bfe5-e4b2adf1cd60
    Thanks

    are you talking about redirect URL in search scope ? FIM will automatically add the searchtype querystring
    for custom groups search scope you can use :
    ~/IdentityManagement/aspx/groups/AllGroups.aspx
    and configure you search scope to use the same UsageKeywords as for the security groups
    and restart your IIS server using the command "IISRESET"
    in your case if you want to create navigation bar link to your group-type search scope use may use this format:
    http://{your fim server}/IdentityManagement/aspx/groups/AllGroups.aspx?searchtype={your searchscope guid}&content=%2a
    ex : http://fimserver/IdentityManagement/aspx/groups/AllGroups.aspx?searchtype=47e0a973-0ab4-46f5-815f-f5028c1af58e&content=%2a

  • Excluding Item IDs from Search Scope

    Hi All,
    I have a defined a search scope on a list at the site collection level. The scenario is when users issue a search query (using OOB advanced search web part) and if the search query happens to be the List Item ID then that record is also in the search result.
    Though this is a correct scenario since the item ID exists in the search scope but to the end user this is not a valid functionality.
    How to exclude this from the search scope?
    Regards
    Arnav

    You can try to remove the ID from the index by modifying the managed\crawl properties.  But then you will affect *anything* that uses that ID (including internal sharepoint features). 
    Chris Givens CEO, Architecting Connected Systems
    Blog Twitter

  • Search Scope that Only Returns Sites

    I'd like to create a search scope that only returns Sites. I don't want any documents, lists, items, or anything else in my results. How would I do this?Murray

    You can use ContentClass:STS_Web
    You can either create a scope or you can simply append it to any query using the search query web part. This would allow the user to search for "project1" and the executed query would be "project1 ContentClass:STS_Web" and therefor only return sites with project1 in the content.
    MCTS: SharePoint 2007, Web Applications
    MCPD: Web Developer
    My Blog: http://corypeters.net

Maybe you are looking for

  • Can send mail but not receive -- connection doctor OK, GetInfo shows msgs

    In the last couple of days I stopped receiving email on my Mac in the Mail app, but not my PC. Both access POP3 accounts at the same ISP, different POP3 accounts. All software is patched to latest version using Software Update -- PowerMac G5 Dual, la

  • Query Explain Plan Help

    I am running the following query against my database SELECT p.ID   FROM rap_counterparties cou,        rap_presentation_cou_ratings pcr,        rap_presentation_states sta,        rap_app_user_profiles aup,        rap_presentations p WHERE cou.unt_id

  • How to uninstall norton anti virus for mac

    how to uninstall norton anti virus for mac

  • How do you plot a path using a .kml file in an embedded google earth in Labview?

    Over the last few days I have been reading all the google earth and lv postings that I can find and I have downloaded a variety of vis and examples that people have posted. I haven't been able to find or figure out a way to display a .kml file that I

  • FIM Web Service connector

    Hello  I'am trying to implement a web service connector for custom application with "Web Service Configuration Tool"  Is there someone who has implemented something like that for a custom web service ?  Thanks