Idoc Script strEqualsIgnoreCase make a wrong evaluation of logic values.

Hi again, this question starts like the last one i put in forum
Re: Cannot find metadata values in workflow queue
but it´s absolutely different.
I need some help customizing workflow action menues.
I´ve created a custom component with an html resource overwriting setup_workflow_action_popups.
Basically is the same code that original. There´s only a little change: in the Approve Link creation section I have put this code (is stupid i know)
<$exec rsAppendNewRow("PopupProps")$>
<$exec setValue("PopupProps", "label", lc("wwApprove"))$>
*<$if strEqualsIgnoreCase(dWfName,"Workflow1")$>*
*<$if strEqualsIgnoreCase(dWfStepName, "Step1")$>*
*<$exec setValue("PopupProps", "function", "javascript:alert('dWfStepName seems to be Step1 and is <$dWfStepName$>');document.Approve_<$dID$>.submit();")$>*
*<$else$>*
*<$exec setValue("PopupProps", "function", "javascript:alert('dWfStepName seems NOT to be Step1 and is <$dWfStepName$>');document.Approve_<$dID$>.submit();")$>*
*<$endif$>*
*<$else$>*
*<$exec setValue("PopupProps", "function", "javascript:alert('<$dWfStepName$>');document.Approve_<$dID$>.submit();")$>*
*<$endif$>*
<$exec setValue("PopupProps", "ifClause", "AllowReview")$>
<$exec setValue("PopupProps", "class", "workflow")$>
<$exec setValue("PopupProps", "id", "workflowApprove")$>
(I have built the component though i think is not necessary since i´m only changing HTML,I restarted Content Server even i think it is not necessary)
I´m watching results in My Workflow Assignments and in Active Workflows.
I have a big trouble. It seems "if" clause doesnt work in Idoc.
I´m getting an alert with this message
dWfStepName seems NOT to be Step1 and is Step1
This means that Step1 is not the same that Step1
So, <$if strEqualsIgnoreCase(dWfStepName, "Step1")$> is not working properly
I tried next other forms with the same result
<$if strEqualsIgnoreCase(dWfStepName, "Step1")==true$>
<$if strEqualsIgnoreCase(dWfStepName, "Step1")==TRUE$>
<$if strEqualsIgnoreCase(dWfStepName, "Step1")==0$>
<$if isTrue(strEqualsIgnoreCase(dWfStepName, "Step1"))$>
I´m really taken aback. i don´t know where is the problem.
Any clue?
Thank you
Thank you very much

In reality of course this should work. Try a simple hcsp page and you will see that this works fine. There must be an issue that you are not comparing what you think. Could be scope or whitespace. to eliminate whitespace change code to...
<$if strEqualsIgnoreCase(strTrimWs(dWfStepName), "Step1")$>
If this doesnt work can you use
<$trace("#all", "#console")$>
to dump everything to the server output. You can manage the server output from Administration > System Audit Information >
then load the page again and patse the trace output here.

Similar Messages

  • Idoc scripting in workflow tokens

    Greetings,
    A question for developers: up to what extent of Idoc Script calls can be made inside Workflow tokens? Only the function wfAddUser or other Idoc Script functions as well?
    I'm trying to develop a dynamic workflow component that involves reading possible user, alias or ad-hoc metadata values from a database table using a custom Idoc Script function, into a token. So basicly, something like this:
    <$wfAddUser(customIdocScriptFunctionToFetchUsers(dDocType),"user")$>
    Is anything like this possible at all? Tests done so far result in the content item entering and exiting the workflow automatically due to probably being unable to load the users, the strange thing is that no erros are being output, not even in the content server output with "workflow" or "idocscript" sections being traced...
    The point of this mechanism is to avoid having to create large ammounts of (hidden) metadata to serve as support to store users/alias to be loaded into workflow steps as tokens. Feel free to suggest any other alternatives tho :p
    Thanks in advance,
    - Tiago Vidigal

    Hey Tiago,
    Typically you try to limit your token script to just wfAddUser. It is possible to use basically any idoc script in a token but any failure at all will result in the behavior you are seeing with the item skipping straight through the step.
    Using your current design here is what I would do:
    -In the entry script for that step make your call via the custom script function
    -Store the result of the lookup into a workflow variable: <$wfSet("usersForStep", getCustomUsers(dDocType))$>
    -do your wfAddUser in the token: <$wfAddUser(wfGet("usersForStep"), "user")$>
    -Sidenote: You can add multiple users at once in one wfAddUser call if you pass a comma delimited string of the usernames
    Reason this works: the Entry script is always evaluated before a token when entering a step, meaning you can put any complex logic there where it is easier to debug and keep your token code clean.
    Hope that helps,
    Andy Weaver - Senior Software Consultant
    Fishbowl Solutions < http://www.fishbowlsolutions.com?WT.mc_id=L_Oracle_Consulting_amw >
    Edited by: Andy Weaver on May 18, 2009 10:55 AM
    (Fixed one of my code snippets)

  • Making Custom Idoc Script function

    Hi all,
    I am making a custom Idoc Script function. I have merged the resource
    table into the core IdocScriptExtensions table. But i am not able to call the custom function in SiteStudio. Find below the steps that i have taken
    step1) I have added a resource (Static Table) in my component which merges to "IdocScriptExtensions" fucntion.
    Step2) I have already created the java class.
    Step3) Edited <td>Myname</td><td>Myclass</td><td>MyloadOrder</td> in the resource with corresponding values.
    Step4) From component settings added the custom classes.
    Step5) made a build of the component.
    Step6) Installed the component in my server.
    now when i go to SS Designer and call this function then no response is generated.
    This component will return me a boolean by quering DB. I have number of sysouts and traces but none of them is printed on the console. Can somebody please provide insited into what probably might be amiss here.
    ANY pointers will be hightly appriciated. waiting for a quick response.
    reagrds,
    sapan

    Hi Sapan,
    For the most part your steps look correct. Personally I would probably do the following:
    1. move your component's classes folder back inside the component
    2. register the folder in the component
    3. add the folder to the class path
    4. in the component's hda file, check to make sure there the merge rule is set for your IdocScriptExtensions entry.
    if all of those are correct, occasionally the content server can be tempermental when new classes are added and so I would try disabling the component, restarting, then enabling and restarting.
    If everything is compiled, it has to be either a classpath issue or an issue merging your IdocScriptExtensions table.
    Also, if you go to Administration>Configuration Info, expand enabled components and find yours, it will tell your the classpath registered for your component(though your code is in the content server classes folder).
    Sounds like you are really close though...did you get the debugger working?
    David

  • Is possible to have a script that makes a text randomly have caps and lower caps... i would love to create a kind of effect so it would look like manuscript - but it cannot be only the same letter in caps or lower caps - I wOuld NeEd oF SOmeTHing LikE Thi

    Is possible to have a script that makes a text randomly have caps and lower caps... i would love to create a kind of effect so it would look like manuscript - but it cannot be only the same letter in caps or lower caps - I wOuld NeEd oF SOmeTHing LikE This (random) - is it possibel?

    Hi,
    Sample with 2 regex:
    Launching the 1rst regex:
    Launching the 2nd regex:

  • IDOC script in custom element forms

    Hi,
    I am using Site Studio 10gr4.
    I was wondering if its possible to use IDOC script inside custom element forms. What I want to acheive is to display a combox box inside a custom element in a static list. The values inside the combobox are retreived from one of the views (created inside Configuration Manager in the content server).
    Your help will be appreciated.
    Many Thanks

    OK, I found the answer :).
    I checked in the custom element element form as an HTM. Chaning it to HCSP fixed the issue :).

  • How to manipulate the date in idoc scripting?

    how can we manipulate date in idoc scripting? How to retrieve the year, month, date from the date? How can we update the year of the particular date in idoc scripting.

    There are a bunch of date / time functions that you can find in chapter 5 of the Idoc Script Reference (the bible for this sort of thing)
    For the sort of things you need to do I would recommend you look at formatDateWithPattern()
    for example to retrieve the year of 'now'
    <$year = formatDateWithPattern(dateCurrent(),"yyyy")$>
    month
    <$month = formatDateWithPattern(dateCurrent(),"MMM")$>
    the patterns for the same rules as Java date formats (unsurprisingly)
    If you want to update the year then I think you need to build the date as a string and the use the parseDate or parseDateWithPattern functions to actually create something that Idoc will recognise as a date object.
    Tim

  • Calling GET_WORKFLOW_INFO_BYNAME service from idoc script

    Hi, i need to call service GET_WORKFLOW_INFO_BYNAME in custom idoc script on documents to determine if the document is in workflow. If it is there is no problem. But if it is not, calling if GET_WORKFLOW_INFO_BYNAME cause exception which is writen to server log.
    I don't want to write this exception to log because of log size.
    Is there any way how to suppress the exception or other method to find if the document is in workflow?
    Best regards

    Hi
    I guess you can check the status of the content to verify if a content is any WF or not . If the status is Review / Edit etc then it indicates the content to be part of a WF .
    Hope this helps .
    Thanks
    Srinath

  • Include Idoc Script in another

    Hi,
    Do we have a way to include (like a library) an .idoc script inside another idoc script ?
    Thanks,
    Sunil

    Absolutely!
    iDocScript contains a feature called include. For more details see http://docs.oracle.com/cd/E23943_01/doc.1111/e10726/c02_application.htm#CSIDO118

  • Implement Oracle UCM 11.11.5 Workflow (idoc scripting)

    Hi guys,
    We are using Oracle UCM 11.1.1.5.
    We have a 3 stages workflow. The stages are called as "Preparation", "Verification" and "Approval". We use Aliases. Users can be a members of many Aliases. But our requirement is a same user can't approve two subsequent steps. Lets say a user is member of all aliases. Hence he will be able to approve all stages of the workflow. But our requirement is the document who prepared should not be allowed to approve it in the verification stage. The system should throw a warning message. in the same way the person who approves in the verification stage should not be allowed to approve it in the "Approval" stage. Can we use idoc scripting to do that? Please give some idea and sample scripts to do this.
    The question we have are how we can identify the previous stage approver and how we can display warning message on the screen when a same approver trying to approve again in the subsequent stages?
    Thanks in advance
    With Regards
    Jacob
    Edited by: user8778076 on Aug 29, 2011 8:39 AM
    Edited by: user8778076 on Aug 29, 2011 9:04 AM

    Hello VJ,
    Please see details on using Rapid Clone -
    FAQ: Cloning Oracle Applications Release 11i [Doc ID:216664.1]
    Cloning Oracle Applications Release 11i with Rapid Clone [ID 230672.1]
    Regards,
    Debbie

  • Deleting several documents in idoc script

    Hello,
    I need some help about one of my customization.
    I would like to create a page on which a user would choose a website
    section and then after choosing it, all the documents of this website
    section would be deleted.
    So, in idoc script, I created a service called "DELETE_DOC_SCRIPTABLE"
    which is the same as "DELETE_DOC" but it is scriptable.
    I also created a service which retrieves all the documents and then I
    loop on the resultset generated and I call the service
    "DELETE_DOC_SCRIPTABLE".
    My first results is then deleted but then, after the first loop, UCM
    doesn't recognize my resultset anymore and so the other results are
    not deleted.
    Here is my code :
    <$loopwhile getValue("RST_DOCS_SECTION_A_SUPPRIMER","#isRowPresent")$>
    <$dID=RST_DOCS_SECTION_A_SUPPRIMER.dID$>
    <$executeService("DELETE_DOC_SCRIPTABLE")$>
    <$exec rsNext("RST_DOCS_SECTION_A_SUPPRIMER")$>
    <$endloop$>
    Here is my error in etc/log file
    "suppression_contenus
    /produits/ucmIntra/dev/custom/GestionSectionsSite/resources/gestionsectionssite_\
    ressources_supprimerContenus.htm
    [ligne 23, car 7]
    An error occured in the file
    '/produits/ucmIntra/dev/custom/GestionSectionsSite/resources/gestionsectionssite\
    _ressources_supprimerContenus.htm'
    q la ligne 98 et au caractre 10. Unable to evaluate the function
    'rsNext'. Unable to find result set 'RST_DOCS_SECTION_A_SUPPRIMER'.
    -> <$exec rsNext("RST_DOCS_SECTION_A_SUPPRIMER")$>
    -> <$endloop$>
    -> </table>
    Thank you in advance if you have any clue about this,
    Regards,
    Julian

    I`ve gotten a little bit closer by hacking at the code..
              <$rsMakeFromString( "rsDeleteDocsBydID", xdID, "dIDstored")$>
              <$numFields = rsNumRows("rsDeleteDocsBydID")$>
              <!-- numFields == <$numFields$> -->
              <!-- To Delete = <$dIDstored$> -->     
              [[%This Works when uncommented %]]
              <!--$dID = dIDstored$-->
              <!--$executeService("ETHER_DELETE_DOC")$-->
              [[%This does not execute the service again? - But returns dIDs correctly??%]]
              <$xnumFields = 0$>
              <$loopwhile xnumFields < numFields $>
                   [[%Recreate RS as Delete_doc service clears all RS?%]]
                   <$rsMakeFromString( "rsDeleteDocsBydID", xdID, "dIDstored")$>
                   <$exec rsSetRow("rsDeleteDocsBydID",xnumFields)$>
                   <$dID = dIDstored$>
                   <!-- Delete this dID = <$dID$> -->
                   <$executeService("ETHER_DELETE_DOC")$>
                   <$xnumFields =(xnumFields +1)$>
              <$endloop$>
    I may look at using the subservice DELETE_BYNAME anyone tried using this instead?
    Thanks

  • Can we execute an idoc script from a custom service?

    Is it possible to execute an idoc script while executing a custom service?
    -Pratap

    There are several ways to execute iDocScript from Java, but in this quick example we will use a PageMerger object. There are several ways to get ahold of a PageMerger object. If you are executing in a context where a service object is readily available you may be able to get a PageMerger object reference with code like this:
    PageMerger pm = m_service.m_pageMerger;
    If that doesn't work for you I would try something like:
    PageMerger pm = new PageMerger(databinder, executioncontext);
    Now that you have your merger object you can execute all kinds of iDocScript code, an example of which might be:
    pm.evaluateScript("<$lc(\"wwMyString\")$>");

  • One script to make multiple cells call one function or vice versa

    Please help.
    I need one script to make multiple cells reference one function or one cell reference multiple functions.
    Goal: On the enter event of cell c1, I want to make cells (this, Header.c1, Example.c1, rLabel) highlighted, and this would be for every other cell that is entered into, their corresponding column header and row header will be highlighted.
    I've tried combining cells: eg
    colourControls.hdfieldLoseFocus(this, HeaderRow.c1, Example.c1, rLabel);
    and I've also tried combining some scripts in the function:
    fieldObj.ui.oneOfChild.border.fill.color.value = "255,255,200";
      HeaderRow.fieldObj.ui.oneOfChild.border.fill.color.value = "255,255,200";
      ExampleRow.fieldObj.ui.oneOfChild.border.fill.color.value = "255,255,200";
    But they dont work. See the link to my form.
    http://www.winstonanddavid.com/example.com
    I tried testing the function with the cell 'c1' but it doesnt work.
    Also, I want to get rid of the multiple lines of script in every other cell.
    How can I do this?

    I played around with the ExtendScript Toolkit and cutted and pasted the previous script from here until I managed to get a script that actually works like I was thinking. I then added a code from the CS4 Reference Manual to move Layer1 to the top (just to see if it worked).
    I have no idea yet if the the code includes something that does not belong, but at least I get no errors. The current code is like this now:
    //Apply to myDoc the active document
    var layerName = LayerOrderType;
    var myDoc = app.activeDocument;
    //define first character and how many layers do you need
    var layerName
    var numberOfLayers=0;
    //Create the layers
    for(var i=0; i<=numberOfLayers; i++)
    { var layerName = "Background";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = "Picture";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = "Text";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    { var layerName = "Guides";  var myLayer = myDoc.layers.add(); myLayer.name = layerName;  }
    // Moves the bottom layer to become the topmost layer
    if (documents.length > 0) {
    countOfLayers = activeDocument.layers.length;
    if (countOfLayers > 1) {
    bottomLayer = activeDocument.layers[countOfLayers-1];
    bottomLayer.zOrder(ZOrderMethod.BRINGTOFRONT);
    else {
    alert("The active document only has only 1 layer")

  • Idoc script function to count string

    Hi,
    Does anyone know if there is any build in function in idoc script to count the number of string.
    For example:
    A, B, C, D, E
    I want to count how many comma's are there using idoc script. If there is no build in function, what would be the best approach to achieve this.
    Many thanks.

    There is no built in function, but I would simply do this:
    <$rsMakeFromString("MyStringRS", "A, B, C, D, E")$>
    <$numCommas = MyStringRS.#numRows - 1$>
    Good Luck, and please award points as you see fit.

  • Idoc Script Study Material

    Hi,
    Can anyone suggest materail/book for Idco Script Starter
    Thanks
    AR
    Edited by: 838623 on Mar 29, 2011 2:25 AM

    Hi,
    Below URL provides entire Oracle UCM documentation http://download.oracle.com/docs/cd/E10316_01/ouc.htm
    Refer documentation for Idoc Script Reference Guide.
    Thanks,
    Ravinder

  • IDOC script to get list of users in alias

    Hi ,
    In Workflow script, I want to check if dDocAuthor exists in some alias. IF exists then do some processing.
    I am not able to compare dDocAuthor with users in alias. Infact I could not find any IDOC script function that returns users in alias.
    Please help.
    thanks

    Check out my blog post on how to bypass workflow via idoc if the author is part of a specific alias (:

Maybe you are looking for

  • Do i have to activate each install through vlm

    This is what I did * I installed NI VLM 2.0 on our license server * i created several network installs (for LV 80, CVI 80) * Checked everything was working fine, and it was * I installed networkinstallversions of LV80 and CVI 80 on workstation A *It

  • Problems Saving in Elements 8

    I have Elements 8. In the last week or so every time I try to save a file I get a message' Cannot complete the action because of a programme error.' I have tried resetting using CTL, ALT & Shift but that has had no effect.

  • How can I tell the number of discs needed to transfer an iMovie to DVD?

    OK, I'll admit it---I'm new to iMovie and have yet to burn a DVD since iDVD was not included on my Mac.  I have ordered a new disc of iLife 09 which should arrive next week, but I'm trying to be prepared to burn some home movies as soon as it is inst

  • AP appear on Airspace 2000, then disappear

    I am trying to get an AP 2006 running with a couple of airlap1131 a/g access points. Using the web interface, they come up just fine, then after about two minutes, they recycle. also, the radios appear to be turned off. any thoughts?

  • DataGrid always only showing 1 record when there should be 5

    When I do the "Test Operation" in the Data/Services pane, I can pull back the expected 5 records, however at run time, a grid that pulls data using the exact same operation and same input value, it only shows the first record.  Is there a setting tha