ASSIGNMENT_ID context in BG_ABSENCE_DURATION

Hi,
Can anyone tell me if ASSIGNMENT_ID context can be used in BG_ABSENCE_DURATION formula ?
I tried a statement like
test = ASSIGNMENT_ID
But it gives me an error saying - 'Local variable used before initialization'
Isn't ASSIGNMENT_ID a context available in the BG_ABSENCE_DURATION fastformula ?
How do i use it ?
Please help.
Regards,
-Debojyoty

The contexts available in QuickPaint Formulas (of which BG_ABSENCE_DURATION is an example) are:
ASSIGNMENT_ID
DATE_EARNED
BUSINESS_GROUP_ID
You would not normally expect to have direct visibility of context values; rather, you would make use of them automatically by referencing a database item or a user-defined function.
If you really want the formula to 'see' the assignment id, you'll need to write a UDF to return it.
what would you do with the assignment id once you'd found it?
Regards
Clive

Similar Messages

  • HRMS user defined functions

    Hello, I have a function I've defined (From the Define Function window). It uses context and normal parameter values. My question is, after defining a function, should I always bounce the server because from what I'm seeing, I'm getting an error each time I try to use the function in my formula. I've setup my function as a "User Defined Function" not "External" function.
    Also, how do I know if a function can accept context parameters. I want to use the ASSIGNMENT_ID context for a formula I'm defining for Appraisal Competency Line Scoring to calculate a competency score and I was wondering if ASSIGNMENT_ID was ok as a context.
    Thanks.

    If you create a function and call it from a fast formula, make sure the parameters you pass from the FF to the function are in the same sequence.
    Make sure that the return value TYPE from the function corresponds to the return variable in the FF.
    Also, compile the FF again, after you have created the function.
    Regards
    Tim

  • How to use DFF value in BG_ABSENCE_DURATION Fast formula

    Hi All,
    I would like to know how can we use DFF values in BG_ABSENCE_DURATION fast formula.
    Can we pass them as input values?
    Also, when we use them as DATABASE ITEMS how does Fast Formula identifies them.
    For example I have created a DFF value HALF_DAY that can take either "YES" nor "NO".
    I tried to use that as input value but that didnt work, not sure if it is possible at all or not.
    I also tried to use that as Data Base ITEM, as follows:-
    IF (ABSENCES_HALF_DAY WAS DEFAULTED ) then
    duration = 'FAILED'
    invalid_msg = 'DFF not working'
    Any help will be much appreciated.
    Thanks,
    Avinash
    but i am getting following error when i access SSHR
    Formula BG_ABSENCE_DURATION: ORA-01403: no data found ORA-01403: no data found Cause: During the PL/SQL execution part, an Oracle error was detected. Action: Please refer to your system administrator.

    Thanks Vigneswar  and Avaneesh for your helpful comments,
    Actually I want to retrive the DFF value that I pass while applying the Leave Request and not that already stored in the data base. I checked and found that the query you have mentioned is retriving the data from base tables.
    select target.ATTRIBUTE6 -- Attrinute6 is database item ABSENCES_HALF_DAY+
    from    per_absence_attendances                target,+
    per_all_assignments_f                  ASSIGN+
    WHERE   sysdate BETWEEN ASSIGN.effective_start_date+
    AND ASSIGN.effective_end_date+
    AND    ASSIGN.assignment_id                  = 647--&B2+
    AND    ASSIGN.assignment_type                = 'E'+
    AND    target.person_id                      = ASSIGN.person_id+
    AND    target.absence_attendance_id  =+
    *(select max (absence_attendance_id)*
    from   per_absence_attendances+
    where  person_id   =  ASSIGN.person_id+
    and    date_start <=  sysdate+
    I have only added folloing lines In my BG_ABSENCE_DURATION FF
    DEFAULT FOR ABSENCES_HALF_DAY is 'XX'+
    if (1 = 1) then+
    duration = 'FAILED'+
    invalid_msg = 'DFF not working: '+ABSENCES_HALF_DAY+
    But evry time output is *"DFF not working : Yes"* no matter what the value I am passing while applying leave. This value "Yes" is stored in DFF attribute 6 for the test employee and I guess FF is retriving this value from DATABSE not from current transaction.
    Could you please help how to retrive run time data.
    Thanks,
    Avinash

  • Application developed using and compliant for jdk1.2.2 needing to get context to WL6.1 running JDK1.3.1

    Note works under JDL 1.3.1, but not under JDK 1.2.2. Is there a fix?
    C:\bea\wlserver6.1\samples>c:\jdk1.3.1_01\bin\java
    examples.jndi.InitialContextExample t3://localhost:9001 system password
    WebLogic context created on behalf of "system"
    C:\bea\wlserver6.1\samples>java examples.jndi.InitialContextExample
    t3://localhost:9001 system password
    java.io.StreamCorruptedException: Type code out of range, is 0
    at java.io.ObjectInputStream.peekCode(ObjectInputStream.java:1280)
    at
    java.io.ObjectInputStream.SkipToEndOfBlockData(ObjectInputStream.java
    :1211)
    at
    java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java
    :776)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:353)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:232)
    at java.io.ObjectInputStream.inputObject(ObjectInputStream.java:978)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
    at java.io.ObjectInputStream.readObject(ObjectInputStream.java:232)
    at
    weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedO
    bjectInputStream.java:107)
    at
    weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedO
    bjectInputStream.java:115)
    at
    weblogic.rjvm.ConnectionManager.readPeerInfo(ConnectionManager.java:6
    86)
    at
    weblogic.rjvm.ConnectionManagerClient.handleIdentifyResponse(Connecti
    onManagerClient.java:140)
    at
    weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:627)
    at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java,
    Compi
    led Code)
    at
    weblogic.socket.JavaSocketMuxer.processSockets2(JavaSocketMuxer.java,
    Compiled Code)
    at
    weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java,
    Compiled Code)
    at
    weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:
    24)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
    Code)
    --------------- nested within: ------------------
    weblogic.utils.AssertionError: ***** ASSERTION FAILED ***** - with nested
    except
    ion:
    [java.io.StreamCorruptedException: Type code out of range, is 0]
    at
    weblogic.rjvm.ConnectionManager.readPeerInfo(ConnectionManager.java:6
    88)
    at
    weblogic.rjvm.ConnectionManagerClient.handleIdentifyResponse(Connecti
    onManagerClient.java:140)
    at
    weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:627)
    at weblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java,
    Compi
    led Code)
    at
    weblogic.socket.JavaSocketMuxer.processSockets2(JavaSocketMuxer.java,
    Compiled Code)
    at
    weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java,
    Compiled Code)
    at
    weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:
    24)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
    Code)
    Failed to contact t3://localhost:9001.
    Is there a server running at this address?
    C:\bea\wlserver6.1\samples>

    Right. Using WebLogic RMI proprietary implementation (t3) with 6.1 requires
    1.3 on the client side. If you absolutely have to use 1.2 on the client side,
    IIOP should work - I just tried this and it looks like WebLogic 6.1 implements
    EJB spec interop requirements pretty well.
    Jonathon Cano <[email protected]> wrote:
    I saw an article saying use iiop and then deploy your beans for such. I can
    get context over IIOP using jdk1.2.2 to WLS 6.1. I have not yet deployed
    beans or recompiled anything to try this all the way. Does this work?
    Should I proceed? or is there a gotcha?
    "Dimitri Rakitine" <[email protected]> wrote in message
    news:[email protected]...
    6.1 requires 1.3 on the client. (it uses dynamic proxies, so 1.2 willnot
    work).
    Jonathon Cano <[email protected]> wrote:
    Note works under JDL 1.3.1, but not under JDK 1.2.2. Is there a fix?
    C:\bea\wlserver6.1\samples>c:\jdk1.3.1_01\bin\java
    examples.jndi.InitialContextExample t3://localhost:9001 system password
    WebLogic context created on behalf of "system"
    C:\bea\wlserver6.1\samples>java examples.jndi.InitialContextExample
    t3://localhost:9001 system password
    java.io.StreamCorruptedException: Type code out of range, is 0
    at
    java.io.ObjectInputStream.peekCode(ObjectInputStream.java:1280)
    at
    java.io.ObjectInputStream.SkipToEndOfBlockData(ObjectInputStream.java
    :1211)
    at
    java.io.ObjectInputStream.inputClassDescriptor(ObjectInputStream.java
    :776)
    atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:353)
    atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:232)
    atjava.io.ObjectInputStream.inputObject(ObjectInputStream.java:978)
    atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:369)
    atjava.io.ObjectInputStream.readObject(ObjectInputStream.java:232)
    at
    weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedO
    bjectInputStream.java:107)
    at
    weblogic.common.internal.ChunkedObjectInputStream.readObject(ChunkedO
    bjectInputStream.java:115)
    at
    weblogic.rjvm.ConnectionManager.readPeerInfo(ConnectionManager.java:6
    86)
    at
    weblogic.rjvm.ConnectionManagerClient.handleIdentifyResponse(Connecti
    onManagerClient.java:140)
    at
    weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:627)
    atweblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java,
    Compi
    led Code)
    at
    weblogic.socket.JavaSocketMuxer.processSockets2(JavaSocketMuxer.java,
    Compiled Code)
    at
    weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java,
    Compiled Code)
    at
    weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:
    24)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,Compiled
    Code)
    --------------- nested within: ------------------
    weblogic.utils.AssertionError: ***** ASSERTION FAILED ***** - withnested
    except
    ion:
    [java.io.StreamCorruptedException: Type code out of range, is 0]
    at
    weblogic.rjvm.ConnectionManager.readPeerInfo(ConnectionManager.java:6
    88)
    at
    weblogic.rjvm.ConnectionManagerClient.handleIdentifyResponse(Connecti
    onManagerClient.java:140)
    at
    weblogic.rjvm.ConnectionManager.dispatch(ConnectionManager.java:627)
    atweblogic.rjvm.t3.T3JVMConnection.dispatch(T3JVMConnection.java,
    Compi
    led Code)
    at
    weblogic.socket.JavaSocketMuxer.processSockets2(JavaSocketMuxer.java,
    Compiled Code)
    at
    weblogic.socket.JavaSocketMuxer.processSockets(JavaSocketMuxer.java,
    Compiled Code)
    at
    weblogic.socket.SocketReaderRequest.execute(SocketReaderRequest.java:
    24)
    at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:139)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,Compiled
    Code)
    Failed to contact t3://localhost:9001.
    Is there a server running at this address?
    C:\bea\wlserver6.1\samples>--
    Dimitri
    Dimitri

  • How to use attributes from different context nodes in one view?

    I am VERY new to the concept of CRM and currently working on creating an alternate version of the BP_HEAD_SEARCH. With help from SAPPRESSs book 'SAP CRM Web Client' i was ble to create my own simple Z-component.
    However after going back and forth the book and the forum (including this [article|https://wiki.sdn.sap.com/wiki/display/CRM/Howtoaddanexistingfieldtoasearchpageofadifferent+component]) i was not able to find a solution to my problem. My current search uses BuilHeaderAdvancedSearch as context node for searching. But the search should also be able to use attributes from BuilActivity, which is directly related to BuilHeader. I can't seem to find a way to get attributes from BuilActivity into the search window of my component without having to change SAP-Standard.
    Is this really the only way? Please advise on possible code and insertion point.

    Any suggestions?

  • How to use one Assign action to create multiple context variables

    Hello, everyone.
    I read some tips from Oracle documentation that said:
    Avoid creating many OSB context variables that are used just once within another XQuery
    Context variables created using an Assign action are converted to XmlBeans and then reverted to the native XQuery format for the next XQuery. Multiple "Assign" actions can be collapsed into a single Assign action using a FLWOR expression. Intermediate values can be created using "let" statements. Avoiding redundant context variable creation eliminates overheads associated with internal data format conversions. This benefit has to be balanced against visibility of the code and reuse of the variables.
    Oracle® Fusion Middleware Performance and Tuning Guide
    +11g Release 1 (11.1.1)+
    Part Number E10108-03
    But I don't know how to do that. Can you show me ?
    Thank in advance
    Edited by: Doubt_Man on Aug 17, 2011 3:30 PM

    if you return sequences, you can declare the return type of your xquery as xs:double*
    (notice the asterix at the end)
    but I have the impression that in the assign action only the first element will be assigned to the context variable
    (correct me if I am wrong)
    So in fact you might indeed have to transform the sequence into a element()*, or concatenate it into a CVS string - for instance using string-join
    http://www.xqueryfunctions.com/xq/fn_string-join.html

  • Error while genetrating gettter method on Context node attribute

    Hi,
    I am working in SAP CRM 7.0 Ehp1.Now I need to create get_p_a and set_p_a method
    on context node attribute.But while selecting attribute and clicking on right and selecting
    on generate P-Getter,getting an error (error message - View not copied or enhanced with wizard; processing not possible).
    This is a custom context node attribute and need to create gettter,setter method.
    Kindly assist on this or suggest is there any way to create method on required context node attribute.
    Regards
    Viren

    Hi there,
    Creation of Getter  Setter is not possible for the AET Generated Views and Components.
    It seems your view is generated using AET Table enhancement feature of Ehp1 and the context node is thus a based on a Z BOL object created by a feature of AET of Ehp1
    For such context node, generation of getter setters is not  possible with right click.
    If you need any of GET_ , SET_, GET_P_ or GET_V , then you need to copy the GET_P_XYZ etc method you find on context node class.
    Hope this helps
    Thanks & Regards
    Suchita

  • The name '' does not exist in the current context

    I have a recurring problem where all of a sudden I can no longer see the values of my variables when I debug my unit tests. I cannot find a pattern as to when this happens but I experience this across one of every 20 tests that I write. Occasionally this
    has also happened during normal debbuging of running code on my machine. 
    I have included 2 screen shots. The first is when it is working. I have a break point set at the declaration of list of types. At this point all my variables are still reporting their values back to the debugger. Once I step over this to the next line (screen
    shot 2) I get the error message 'The name '[variable name]' does not exist in the current context'
    This problem is annoying me to no end. If anyone has any insight as to why this might be happening I would be very much appreciative.
    My Settings/Configuration
    Using Visual Studio 2013 Premium (Version 12.0.31101.00 Update 4)
    Projects are all set to Target Framework = .NET 4.5.1
    Resharper 9.1 is installed
    My active configuration is debug mode, Any CPU
    My PC is 64bit and so is the O/S windows 8.1
    All of my projects are also compiled and built in debug mode
    For all my projects configuration debug has the Optimize Code check box unchecked
    I am unit testing code in an outside project referenced by the unit testing project (standard unit test project setup)
    I make use of the latest version of NSubstitute in my tests although I do not think that would have any bearing on this issue
    I omitted the code following the error because it is not relevant. I had cut it out and replaced it with a Task.Delay(4) which resulted in the same issue. 
    What I have tried so far
    I have tried debugging the unit test  from Visual Studio Test Explorer instead of from Resharper with the same result.
    If I remove 2 items at the end of the array it starts to work again (so 6 items initialized instead of 8)
    I clean solution with rebuild has no effect
    Removing properties of the array also seems to work, example remove all initialization of property Value
    Mark as answer or vote as helpful if you find it useful | Igor

    Hi IWolbers,
    >>I have a recurring problem where all of a sudden I can no longer see the values of my variables when I debug my unit tests. I cannot find a pattern as to when this happens but I experience this across one of every 20 tests that I write. Occasionally
    this has also happened during normal debbuging of running code on my machine.
    So you mean that it worked well before, am I right? 
    If you debug the same app in other VS machine, does it work well? So we could make sure that whether it is related to the VS IDE.
    Please disable all add-ins in your VS IDE, and then reset your VS settings, debug it again.
    https://msdn.microsoft.com/en-us/library/ms247075(v=vs.100).aspx
    Or you could run your VS in safe mode, debug it again, at least, we could know that whether it is the add-in's issue.
    https://msdn.microsoft.com/en-us/library/ms241278.aspx
    To make sure that it is not the project files' issue, create a new blank solution, copy the project files to the new solution, clean and rebuild the solution, check the result.
    >>Once I step over this to the next line (screen shot 2) I get the error message 'The name '[variable name]' does not exist in the current context'
    How about debugging it with "Step Into" instead of "Step Over"? Or you could add breakpoints between 234 line to 241 line, after the breakpoint is hit, check the watch window again. How about the result?
    In addition, do you check other debugger window like local or others?
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Creation of context sensitive help with pure FM 12 usage doesn't work

    Hi,
    I hope somebody is able to help me with a good hint or tip.
    I am trying to create a context-sensitive Microsoft Help with FM12 only using the abilities of FM (no RoboHelp). For some reasons, my assigned ID's are not used in the generated chm file and therefore the help does not work context-sensitively.
    What did I do?
    - I created my FM files and assigned topic aliases to the headers. I did this two ways: a) using the "Special" menue and assigning a CSH marker and/or b) setting a new marker of type "Topic Alias" and typing the ID. I used only numeric IDs like "2000" or "4200",
    - I created a .h file (projectname.h) - based on the format of the file projectname_!Generated!.h (I read this in some instructions). So the .h file (text file) looks like this:
    #define 2000 2000 /* 4 Anwendungsoberfläche */
    #define 2022 2022 /* 4.1.1 Menü Datei */
    #define 2030 2030 /* 4.1.3 Menü Parametersatz */
    #define 2180 2180 /* 6.6.7 Objektdialog Q-Regler */
    #define 2354 2354 /* 6.9.2 Objektdialog Extran Parameter */
    #define 2560 2560 /* 6.9.5 Objektdialog Extran2D Parametersatz */
    - I published the Microsoft HTML Help. A projectname_!Generated!.h has been created. My IDs were not used in this file:
    #define 2000    1
    #define 2022    2
    #define 2030    3
    #define 2180    4
    #define 2354    5
    #define 2560    6
    - When I open the .chm file and look in the source code, the ID even is totally different. It is not the one, I assigned in FM, it is not the one which I assigned in the projectname.h file and it even is not the one, which was put in the projectname_!Generated!.h file. It is a generated name starting with CSH_1 ...n in a consecutive way numbered.
    Example:
    <p class="FM_Heading1"><a name="XREF_72066_13_Glossar"></a>Gloss<a name="CSH_1"></a>ar</p>
    What goes wrong? Why does FM not take my assigned IDs? I need to use these IDs since our programmers are using those already - I had to re-create the whole online help but the programs stay untouched.
    Please help!
    Many thanks
    Mohi

    Hi Jeff,
    thanks for your note!
    The text in my marker is just a number like "2000" or "4200". As said, I created manually a my.h file and used this marker there. E.g.
    #define 2000 2000.
    Whereby the first 2000 (in my opinion) is the marker text and the second 2000 is the context ID which the programmers are using for the context sensitive call of the help. My definitions in the my.h file were translated to #define 2000 1 (in the my_!Generated!.h file). The source code "translates" the context ID into CSH_8.
    I am still confused :-/
    Thanks
    Mohi

  • Creation of context index on index-organized table

    I encountered a problem when creating a domain index(intermediate text context index) on a index-organised table in oracle 8i.
    The description of the error is stated below:
    "ORA-29866: cannot create domain index on a column of index-organized table "
    I have configured intermediate text properly and even it worked for those tables which are not index-organised(ordinary tables).
    This problem has occured only when i made the tables as index organised.
    Please provide us a solution to this problem as early as possible.
    In case if you require any more details i shall provide them.

    Please ask questions about Oracle Text (formerly interMedia text) in the Oracle Text forum. You will get a quicker, more expert answer there.

  • Creation of context index on index-organized tables

    I encountered a problem when creating a domain index(intermediate text context index) on a index-organised table in oracle 8i.
    The description of the error is stated below:
    "ORA-29866: cannot create domain index on a column of index-organized table "
    I have configured intermediate text properly and even it worked for those tables which are not index-organised(ordinary tables).
    This problem has occured only when i made the tables as index organised.
    Please provide us a solution to this problem as early as possible.
    In case if you require any more details i shall provide them.

    creation of domain indexes (such as context) on iot's
    is not currently supported in oracle.

  • ColdFusion 11: cfclient in the context of the CFML language, not the tooling

    G'day:
    I am reposting this from my blog ("ColdFusion 11: <cfclient> in the context of the CFML language, not the tooling") at the suggestion of Adobe support:
    @dacCfml @ColdFusion Can you post your queries at http://t.co/8UF4uCajTC for all cfclient and mobile queries.— Anit Kumar Panda (@anitkumar85) April 29, 2014
    I have edited this in places to remove language that will be deemed inappropriate by the censors here. Changes I have made are in [square brackets]. The forums software here has broken some of the styling, but so be it. There is worthwhile discussion in the comments of the article on my blog: perhaps go have a read.
    G'day:
    This article could end up being a complete waste of space, as I am operating under more real-world re-interpretation of the raison d'être of <cfclient>, as described by Ram:
    ColdFusion [11] has added support for client side CFML (<cfclient>) and this code is translated to JavaScript
    Mike Henke has pointed out that the first part of this "CF11 has added support for client-side CFML" is actually ******** (my wording, not his):
    "ColdFusion Splendor has added support for client side CFML" is probably phrased wrong and gave me flash backs to VBScript or CFML running in the client browser.
    Maybe this is better verbiage. "ColdFusion Splendor has added support for CFML to generate JS".
    Because... there's not such thing as "client-side CFML". That would imply CFML actually running on the client (ie: the browser, or the mobile device, as is the target of <cfclient> as a concept). This is absolutely not true. I know Ram went on to qualify what he meant there, but the messaging from Adobe on <cfclient> has been inaccurate. Possibly I think to the point of actual misrepresentation (in the legal sense, I mean).
    What <cfclient> does is... convert CFML code to JavaScript. So let's look at that idea.
    Why I say this article could be a complete waste of space is that I dunno if this is the intent of <cfclient>; because, really, the messaging from Adobe as to what <cfclient> is for is very muddied. In general the narrative about it is bundled-in with various features of ColdFusion Builder 3.0, in regards to mobile application creation and packaging (and debugging, and all sort of stuff that sounds quite nice but I don't care about as I don't use CFB).
    However <cfclient> has to stand on its own merit in the CFML language, completely decoupled from CFB features. And as far as I can tell, Mike is right: as far as CFML goes, <cfclient> is a tag which tells ColdFusion to - instead of compiling to byte code - compiles the enclosed CFML code to JavaScript instead.
    This of course just sets my alarm klaxons going.  Because Adobe are (I choose my words carefully) [not very good] at converting CFML to client-side code. This has been borne out by <cfform>, <cflayout>, <cfpod> etc. Back in the days of CFMX7 the "CFML-to-client-side" wizards had some merit, because the client-side arena was still immature, and the team at Macromedia actually had some exposure to the idea of "website development", so they knew where the pain points were that they could possible ameliorate. Times have changed, and the client-side of things is probably now more mature an environment than CFML is - Javascript is probably are more coherent language than CFML is, now - and it is very very very clear that the current Adobe ColdFusion Team don't know the first thing about web development (they can't even write decent CFML for their own documentation, before we get onto how they'd be doing web work!), so they are completely out of their depth when it comes to addressing pain points that web devs might have these days. Not only have they not walked a mile in a web dev's shoes, they don't even - as far as I can tell - know what shoes are, or why someone would be wearing them.
    And <cfclient> is a far more "meta" solution than <cfform> or <cfpod> were... at least the CFML-to-client-side solution there had a tangible target in mind. <cfclient> has removed the targets, and is just a tag designed for converting general CFML to general JS. Yikes.
    600-odd words in, here's some code. This is the first-ever code I have written using <cfclient>:
    <cfclient> <cfset msg = "G'day World"> <cfoutput>#message#</cfoutput> </cfclient>
    So I'm off to a false start: I admit I'm sitting in the pub and I've had a few pints (probably four, I guess; this is "having some drinks before deciding to actually drink this evening" sort of level for me), and I inadvertently [messed-up] my variable names here. And this did not yield a compile error. The error just fell through to JS, where it did error
    Uncaught ReferenceError: message is not defined gdayWorld.cfm:4
    If, in contrast, I tried this in CoffeeScript, I'd get this:
    coffee> msg = "G'day world"
    'G\'day world'
    coffee> alert msg
    undefined
    coffee>
    alert message
    ReferenceError: message is not defined
        at eval (eval at  (http://larryng.github.io/coffeescript-repl/js/main.js:96:26), :1:9)
    Important note: I know nothing about CoffeeScript - it seems like a solution to a non-existent problem to me - so I just googled "hello world coffeescript" and REPLed the code on http://larryng.github.io/coffeescript-repl/.
    The point is here is that ColdFusion, during the "compile" process should actually notice I am referencing a variable that doesn't exist. I'm OK with this being a runtime error in the normal CFML-compile process, because there could be many moving parts (and other files) involved in the runtime environment, but I don't think this is a valid notion with <cfclient>? Or maybe it is?
    Update:As Ray points out and Aaron agrees with below: I was being unduly harsh here... it's entirely reasonable for variables to be declared in other JS code elsewhere in the response.
    Anyway, once I actually write my code properly, I get this:
    G'day World
    On the screen. What CF actually sends back in the response is this:
    <script type="text/javascript" src="/CFIDE/cfclient/cfclient_main.js"></script> <script type="text/javascript" src="/CFIDE/cfclient/cffunctions.js"></script> <meta name="viewport" content="width=device-width"> <script type='text/javascript'>globalDivStruct=null;var _$gdayWorld_func=function(){var self=this;var variables={};self.__init=function(){var localdivstruct=globalDivStruct;var __output_var="";var tmpVarArray={};message="G'day World";localdivstruct.outputvar+=message;return""}}; function __startPage__$gdayWorld(){document.write("\x3cdiv id\x3d'__cfclient_0'\x3e\x3c/div\x3e");window.ispgbuild=false;var clientDivStruct={divId:"__cfclient_0",outputvar:""};globalDivStruct=clientDivStruct;try{_$gdayWorld=new _$gdayWorld_func;_$gdayWorld.__init()}catch(__eArg){if(__eArg!=="$$$cfclient_abort$$$")throw __eArg;}__$cf.__flush(clientDivStruct)}__startPage__$gdayWorld(); </script>
    [Blimey]. To output a string variable? Really? That's what you compile my CFML down to?
    Gobsmacked.
    And [forget] emotive things like "gobsmacked"... if one looks at the size of the response, it's 128kB to represent "G'day World" on the screen. 128kB might not be a great deal these days when it comes to a web page, but when it comes to rendering "G'day world", it's lunacy. And on a mobile phone - which intrinsically might be in an area in which one is paying a premium for data - it's just irresponsible. This is before we get to the point that it seriously should not take 128kB of data to render 11 bytes.
    Blimey. To be honest I was gonna try some more tricky CFML and see how it compiled, but I've run out of will to live (and I have to concede the beer is getting the better of me, and my laptop battery is almost dead). I'll continue this, but I will let this article stand or fall on its own merit; something <cfclient> certainly seems to be unable to do, thusfar.
    I'll be back on the case with this tomorrow.
    Adam

    The functions defined in the cffunctions.js are not namespaced. If it is namespaced, you would have to add the namespace while using a function inside cfclient.
    These functions are not namespaced, so that you can use the same syntax for using a function inside and outside the cfclient block.
    This is indicative of everyone's concern that you guys would just implement / encourage poor practice in your <cfclient> implementation.
    How is it - given you're "compiling" the CFML anyway - you cannot translate source code that says "listlen()" into "compiled" JS that is CF.listLen() or something? Thus good CFML can be translated into good JS.
    You seem to think that there's a one-to-one mapping between what the CFML says and what the resultant JS needs to be.
    You've basically written a mechanism for a CFML developer to write bad JavaScript.
    Well done.
    Adam

  • Error in Updating ctxsys.context index using ctxsrv

    Environment :
    Linux 6.2,
    Oracle 8.1.6
    character set : zhs16gbk or zhs16cgb231280
    I can create an ctxsys.context index(using CHINESE_VGRAM_LEXER) on a long column, and i can rebuild this index with no parameters.
    When i want to rebuild this index automatic using ctxsrv, this error occur ---
    DRG-50857 Oracle error in drtldml(dml)
    Ora-2000 error
    anybody can help me?
    null

    the complete error:
    Dml batch: cid=1023
    End batch: return code is 1
    DRG-50857: oracle error in drtldml(dml)
    ORA_20000: interMedia text 4mNs
    DRG-50857: oracle error in drsxsopen
    ORA-01480: STR83V51dA?H1IY?U:sW:
    null

  • Unable to Load Metadata (Error in shared.context.ContextLoader in startup)

    Hi,
    I am currently installing fixes on an environment, and every time a patch was installed the application server starts up. The application starts up successfully until I installed 8424662. I still don't know if this is the patch that causes the error, but here's the part of the log that states the error:
    - 2010-03-29 07:31:12,030 [Thread-1] ERROR (shared.context.ContextLoader) Unable to load metadata for package com.splwg.base.domain.common.masterConfiguration
    java.lang.NullPointerException
         at java.io.Reader.<init>(Reader.java:61)
         at java.io.InputStreamReader.<init>(InputStreamReader.java:55)
         at com.splwg.shared.context.PackageMetaInfoLoader.getManagedObjectDataAndExtractHashInfo(PackageMetaInfoLoader.java:53)
         at com.splwg.shared.context.PackageMetaInfoLoader.getContextEntities(PackageMetaInfoLoader.java:48)
         at com.splwg.shared.context.PackageMetaInfoLoader.read(PackageMetaInfoLoader.java:44)
         at com.splwg.shared.context.ContextLoader.loadFromStream(ContextLoader.java:90)
         at com.splwg.shared.environ.ContextManagedObjectSet.loadFromStream(ContextManagedObjectSet.java:120)
         at com.splwg.shared.environ.ContextManagedObjectSet.loadFromStream(ContextManagedObjectSet.java:107)
         at com.splwg.shared.environ.ContextManagedObjectSet.loadAllContextManagedObjects(ContextManagedObjectSet.java:72)
         at com.splwg.base.support.context.ContextFactory.loadManagedObjectForApplication(ContextFactory.java:194)
         at com.splwg.base.support.context.ContextFactory.buildContext(ContextFactory.java:106)
         at com.splwg.base.support.context.ContextFactory.buildContext(ContextFactory.java:90)
         at com.splwg.base.support.context.ContextFactory.createDefaultContext(ContextFactory.java:498)
         at com.splwg.base.web.startup.DeferredXAIStartup.run(DeferredXAIStartup.java:73)
         at java.lang.Thread.run(Thread.java:595)
    - 2010-03-29 07:31:14,873 [main] INFO (web.startup.SPLWebStartup) Application Context shutdown successfully
    Any help on this problem is greatly appreciated. Thank you so much!

    Patch 8424662 incorporates an entry in contextManagedObjects.xml that points to a class com.splwg.base.domain.common.masterConfiguration but this class is not yet present in spl-base.jar file. Patch 8711158 should be installed, since it contains this class.

  • BRF Expression - Implementation class OCA001 - No Context Component Exist

    Dear All,
    I am trying to create an expression in BRF.
    Application class is ISHERCM_PP and Implementation class OCA001 (Access to simple context). As expected after selecting this implementation class Result Type field is not editable. I selected Context 0MODBOOK_CONTEXT, after pressing enter it gives an error message that "First Enter a Result Type". After this I tried to select Context Component, but in F4 there is no values found.
    First time I am creating an expression for implementation class OCA001, please suggest, what I am missing.
    Thanks in Advance
    Sudhir Gupta

    Sudhir,
    Can you explain what you want to do in terms of the business process?
    When the event is triggered there is no information yet available about the where-used lists
    that are created asynchronously after the module bookings are saved. If the module context contained in this structure does not suffice to program a BRF action or expression, the where-used lists can be read from the database additionally*
    *Table Type for Program Type (in this and the last field of the structure the where-used lists are
    contained in their state before the activity that triggered the event was executed. The current state
    must be read from the database if necessary.
    br,
    Rob

Maybe you are looking for

  • Re-create Mailbox Database

    I have a DB on a disk that is almost out of space, so I've moved all user mailboxes to a new DB, as recommended rather than offline defragging. I have a single DAG made up of 3 members although 2 have all the DB Split between them (Active/passive). A

  • Downloaded backup and my pictures are missing

    I had previously restored my phone from a backup stored on the cloud, the pictures downloaded - most of them, but were very fuzzy and never cleared up. I couldn't even text these old photos to friends (or email). Today I had some downtime and decided

  • Long Sync times...... Solved!!!

    Over the past 2 months I have been moving my nearly 4TB iTunes Library from Win 7 64bit to my brand new Mac Mini with Lion. Like many, I made the assumption that because iTunes was an Apple product it would run at its best on an Apple product. So far

  • Using ipod shuffle with more than 1 computer

    Some of my music library is on my work machine and some of it is on my home machine. This has never been an issue with my ipod classic. I plug it into either machine and it connects no problem. Not so with my shuffle. After I loaded it up with songs

  • Need advice on which licensing to buy

    I work in PC tech support by day, and have supported a friend's small business on and off for the last few years. I am tasked with upgrading an aging Win 2000 server and am thoroughly confused by Microsoft's new terminology for their services and lic