Logical Equal Functoids

I have a Source Schema with the ReqID which is a String. I have to Map to the Destination Schema. For example,if the ReqID is Req357 it has to put '1' in the Destination Schema ReqID (which is also string type) or else it has to put '0'in the destination.
I did this way, it shows me error. How can this be approached or do I have to use just the scripting for doing this.

You have two options:
You can do like,
If you want to use functiond for this:
Drag Equal functiod
Connect ReqID as first parameter
Add “Req357” as the second parameter for Equal functiod
Drag Value Mapping functiod
Connect Equal functiod as first parameter to value mapping functiond
Add “1” constants as the second parameter to value mapping functiond
Connect value mapping functiond to output schema’s ReqID
Drag Not-Equal functiod
Connect ReqID as first parameter
Add “Req357” as the second parameter for Equal functiod
Drag Value Mapping functiod
Connect Equal functiod as first parameter to value mapping functiond
Add “0” constants as the second parameter to value mapping functiond
Connect value mapping functiond to output schema’s ReqID
 Else other options is using the scripting functiod.
Just connect input schema's ReqID filed to scripting function and use the following code in the inline C#
public static string ValueMap(string ReqID)
string ret = String.Empty;
if (ret.Trim().TrimStart() == "REQ357")
ret = "1";
else
ret = "0";
return ret;
Connect output of the script to output schema's ReqID field.
If this answers your question please mark it accordingly. If this post is helpful, please vote as helpful by clicking the upward arrow mark next to my reply.

Similar Messages

  • How to use logical operator in struts logic:equal

    Hi All,
    I need to translate:
    if ( a == 'option1' || a == 'option2' )
    to struts code....
    I don't know how to put || or && in <logic:equal.... ?&#65533;?&#65533;?&#65533;?
    Many thanks

    Must it really be Struts? If so, try asking this question at their own forum/mailinglist at apache.org.
    Can it be JSP? If so:${a == 'option1' || a == 'option2' ? 'outputThis' : 'outputElse'}Can it be JSTL? If so:<c:if test="${a == 'option1' || a == 'option2'}">
        <!-- Do your thing. -->
    </c:if>And please don't mark threads as answered if the question is not answered. I almost ignored this thread.

  • Compare Two Values in logic:equal issue !!!!!!!!!!!

    Hi Techie !!!!
    I have list object from DB inwhich i want compare a field in <logic:equal> Struts EL ....... I have written the following code.....
    <%
             List list = (List)request.getAttribute("AppointmentDetailNavigationList");
          pageContext.setAttribute("list", list, pageContext.REQUEST_SCOPE);
    %>
    <body>
    <ul>
         <logic:iterate id="item" name="list" type="com.bean.AppoinmentInformation" scope="request">
               <logic:equal property="rsc_name" value="rsc_name">   // This is for test only
                         *// Here i want compare rsc_name if comes two times in list i want come out of this scope....*
               </logic:equal>
         </logic:iterate>
    </ul>
    </body>
    </html>          My requirement is a field with duplicate, wanna come out of the scope from the list...
    Any one help me out.....

    Wouldn't it be easier to use a Set which does not allow duplicates? That would nip the problem at the source rather than bringing it all the way to the jsp and not displaying it.
    However if you have to have it this way, there is no easy way to break out of a loop in logic tags. Maybe some murky servlet code with a break command in scriptlets would do the trick, but you really have to scour the source code to confirm that.
    cheers,
    ram.
    Edited by: Madathil_Prasad on Apr 26, 2010 1:00 PM

  • Problem with logic:equal

    hi!
    i have a problem with my code.
    <logic:iterate id="_contilist" name="contilist">
    <logic:iterate id="_continentall" name="continental">
    <logic:equal name="_continentall" property="val(GCCSL_SL_ID)" value="_contilist.val(SL_ID)">
    <tr class="list">TEXT</tr>
    </logic:equal>
    </logic:iterate>
    </logic:iterate>
    TEXT is nerver displayed!
    both beans contilist and continental are filled and GCCSL_SL_ID and SL_ID are equal.
    is the code correct or is it not allowable that I use contilist.val(SLID) in this equal?
    whit greetings

    <logic:equal name="_continentall" property="val(GCCSL_SL_ID)" value="_contilist.val(SL_ID)">
    Two things here
    1 - you can't use parentheses in the property/value tags to indirectly pass a parameter to a method. The property is a String being the property exposed by the bean. So property="name" or property="id" are valid, but property="val(name)" Is not as far as I am aware.
    2 - value is currently a String. If you want it to be actually evaluated, try value="<%= _contilist.val(SL_ID) %>"
    To me though, this sort of filtering logic should be done in the action. Your JSP should just receive one list to print out.

  • Problem with logic:equal tag when used with bean:write

    Hi All,
    I have a problem with logic:equal.When i tried to use the following piece of code its not working
    <logic:equal name="var in session" value="<bean:write name='var in request'/>">
    Do some thing
    </logic:equal>
    its not working i know we cant use nested tags
    is thr any alternative instead of using a scriplet

    A scriptlet expression is about all you can do.
    <bean:define id="tempVar" name="var in request"/>
    <logic:equal name="var in session" value="<%= tempVar %>">
    ...If you have a JSP2.0 container with EL enabled, then you could use an EL expression instead of the standard <%= expr %>

  • Logical translation of nested logic:equal tags ?

    I see this in a JSP (I've simplified it) that I have to modify:
    <logic:notEqual name="someForm" property="XYZ" value="4">
    <logic:notEqual name="someForm" property="XYZ" value="5">
    <logic:notEqual name="someForm" property="XYZ" value="5">
    <TD>String 1</TD>
    </logic:notEqual>
    </logic:notEqual>
    </logic:notEqual>
    The effect it has is like an "AND".
    So if ((XYZ != 4) AND (XYZ != 5) and (XYZ != 6))
    then show the string.
    Now I wanted to add something that said "but if it IS one of those three... (an OR condition, like "equals this OR this OR this"), then show something else."
    So I tried the above except changed them to logic:equals, and it doesn't work. In fact the behavior doesn't change at all, because I think it's doing "AND" again. And of course, it's never going to equal 4 AND 5 AND 6 at the same time.
    Am I straight on this? How do you create an OR condition? I looked at the <nested:equal> tag a little bit, but I'm not certain I understand what it offers.

    Hi,
    You are not getting the desired result because you are trying to aggregate the depreciation and the accumulated depreciation of the same month and post the result again in the same month. Lets say the code is working for 2009.MAR. You are trying to add the depreciation and accumulated depreciation of 2009.MAR. However, you still dont have the acc depreciation of 2009.MAR. You basically need to take the acc depreciation of the previous month.
    You can try something like:
    *WHEN ACCOUNT
    *IS Depreciation
         *FOR %MON% = 2009.FEB,2009.MAR,2009.APR
              *REC(EXPRESSION = %VALUE% + ([ACCOUNT].[AccumDep],[TIME].Previous), ACCOUNT=AccumDep)
         *NEXT
    *ENDWHEN
    *COMMIT
    You can have a property called Previous to store the previous month of each period in the time dimension.
    Hope you got the idea.

  • logic:equal  ...    &&  bean:write ...       problem

    <bean:define id="statusNew" value="8500" type="java.lang.String"/>
              <logic:iterate id="columnValue" name="dataRows" indexId="colIndex">
                        <logic:equal name="colIndex" value="0">
                        <TD width="2%" align="left" class="formFieldValue">�
    <logic:equal name="statusNew" value="<bean:write name='columnValue'/>">
                             new
                                  <bean:write name='columnValue'/>
                                  <bean:write name='statusNew'/>
                             </logic:equal>
    <logic:notEqual name="statusNew" value="<bean:write name='columnValue'/>" >
                             old
                                  <bean:write name='columnValue'/>
                                  <bean:write name='statusNew'/>
                             </logic:notEqual>
                        </TD>
                        </logic:equal>
    In the above code snippet when I print the values i.e
    <bean:write name='columnValue'/> and
    <bean:write name='statusNew'/> they are equal but the logic equal doen't work(never gets into logic:equal condition)
    Plz let me what is wrong in this

    Is the problem that it is using == and not equals()?

  • Struts logic:equal problem

    Hi,
    I'm having trouble with the following:
    <logic:equal name='searchSizeTracker' property='page_no' value='<%searchActionForm.getCurrentPage()%>'>
    even when the page_no value of searchSizeTracker and the currentPage property of searchActionForm both = 1, the logic doesn't display the contents of the logic:equal tags???
    I've included a JSP fragment below.
    Thanks.
    ==============================
    JSP Fragment
    ==============================
    <logic:present name="searchActionForm" scope="session">
    <bean:define id="searchActionForm" name="searchActionForm" scope="request"/>
    </logic:present>
    <tr>
    <td align="center" colspan="4">
    currentPage = <bean:write name='searchActionForm' property='currentPage'/>
    <br>
    currentActionID = <bean:write name='searchActionForm' property='currentActionId'/>
    <br>
    <logic:iterate id="searchSizeTracker" name="searchSizeTracker" type="uk.co.troutlure.bom.SearchTrackerObject" scope="request">
    <logic:equal name='searchSizeTracker' property='page_no' value='<%searchActionForm.getCurrentPage()%>'>
    <strong>
    <jsp:getProperty name="searchSizeTracker" property="page_no"/>
    </strong>
    </logic:equal>
    <logic:notEqual name='searchSizeTracker' property='page_no' value='<%searchActionForm.getCurrentPage()%>'>
    <a href="<%=request.getContextPath()%>/performSearch.do?pageRequired=<bean:write name='searchSizeTracker' property='page_no'/>&action_id=<bean:write name='searchActionForm' property='currentActionId'/>&searchType=2&currentScreen=search_reorder"><jsp:getProperty name="searchSizeTracker" property="page_no"/>
    </a>
    </logic:notEqual>
    </logic:iterate>
    </td>
    </tr>
    ==============================

    Hi
    You have made a small mistake in the coding of your JSP. You please replace
    <logic:equal name='searchSizeTracker' property='page_no' value='
    <%searchActionForm.getCurrentPage()%>'>
    with
    logic:equal name='searchSizeTracker' property='page_no' value='
    <%=searchActionForm.getCurrentPage()%>'>

  • logic:equal + hashmap

    hi
    i have a bean in jsp which has a HashMap like this
    <bean:define name="actionFormSample" id="sampleBean" property="myHashMap" type="java.util.HashMap"/>.
    Now i have to use <logic:equal>tags to compare value of a key in the hashmap
    only if it is YES i have to show a particular text box.
    can anybody tell how to use logic equal on a hashMap.
    Note: i dont want to use javascript here

    Hi,
    You can use "history.go(0)" to refresh/reload the current page. You need to call "history.go(0)" when ever any changes occoured. For more information visit http://www.htmlgoodies.com/tutorials/getting_started/article.php/3479551.
    Thanks.

  • The "Logical AND" functoid has place holders. Replace these with appropriate links or constants.

    Hi,
    I am getting the below error in the BizTalk Mapper when trying to compile the application.
    The "Logical AND" functoid has place holders. Replace these with appropriate links or constants.
    Kindly advice the cause of the error.
    Thanks
    Regards, Vivin.

    Hi Morten,
    I found the issue!! There were two AND functoids with a invalid input parameter and I removed those and the error disappeared.
    Thanks for the helping in finding the cause.
    Regards, Vivin.

  • Check for null or empty in the functoid

    I want to check for null and empty values on input source node. If there exists a null or empty in the input source node, I should not pass that to output destination node. Does the
    following attachment work? I want to check for null or empty in the date and time and then concatenate them to send to output. If any of them is null or empty, the other should not fail. In the Not Equal Functoid I am checking for blank, but how to check for
    null?

    A null check might not be you best option.  If your requirement is you must have both the date and time component supplied in order to populate EventDate, then I would use a Script Functoid that takes data and time as parameters.
    In the C# method, first check if either is an empty string, if so return an empty string.
    If not, TryParse the data, if successful, return a valid data string for EventDate.  If not, error or return empty string, whichever satsifies the requirement.

  • Logic control in JSF's jsp

    Hello I have fundmental question to ask;
    In Struts or JSP page, you can use logic control to determine what will display. For intance, the tag on strut <logic:match> <logic:equals>. I am wondering how to have this sort logic in JSF. Thanks!

    Thanks guys!
    the simple solution is what you said:
    in JSF page, binding rendered to a propertity in the bean. on the bean create the property - method to have the logic to return true or false. Do you think if it is a better solution than using jstl -- I dont know too much JSTL - I am more service side developer such as proxy service, application server to host tcp connection from clients...

  • Using equals() to compare strings

    It was told in a previous post that when comparing two strings to use the equals()
    So rather than doing something like this
    package relationships;
    public class Starter {
         public static void main(String[] args){
              String foo = "foo";
              String bar = "bar";
              if(foo == bar){
                   System.out.println("Strings are logically equal");
              } else if(foo != bar){
                   System.out.println("Strings are not logically equal");
    }Where the console would output "Strings are not logically equal" How would I do this using the equals() (other then using else)
    package relationships;
    public class Starter {
         public static void main(String[] args){
              String foo = "foo";
              String bar = "bar";
              if(foo.equals(bar)){
                   System.out.println("Strings are logically equal");
              } else if( /* WHAT GOES HERE? */ ){
                   System.out.println("Strings are not logically equal");
    }I know to test if they are equal just to go like this foo.equals(bar) but what would I put in the else if?
    else if( /* WHAT GOES HERE? */ )

    Where the console would output "Strings are not
    logically equal" How would I do this using the
    equals() (other then using else)You don;t need anything else. If it is not true it is false there isn't a third boolean value of maybe or perhaps.

  • Boolean Logic in the Page

    Hi!
    I have a beginners problem that seems very trivial, but I can simply not find the solution. How do you do boolean logic in a JSF page. I want to be able to hide some buttons depending on some data in the bean, but I do not know how to do that. I guess what I am after is the equivalent of the Struts <logic:equal> and <logic:notEqual> tags.
    Regards,
    Magnus

    Use rendered attribute.
    For example:
    <h:commandButton value="Edit" action="edit" rendered="#{MyBean.editable}" />
    In this example, editable should be a bean property with type Boolean and public getter.
    Generally, you can use any expression based on JSF EL (JavaServer Faces Expression Language).
    For example:
    <h:commandButton value="Create" action="createUser" rendered="#{MyBean.userName == null }" />

  • JSP - Nested Jakarta Struts Logic Tags

    Hi,
    Simple question....
    Can Jakarta Struts Logic tags be nested when coding JSP's
    i.e.
    ==========================================
    <logic:iterate id="searchSizeTracker" name="searchSizeTracker" type="uk.co.troutlure.bom.SearchTrackerObject" scope="request">
    <logic:greaterEqual name='searchSizeTracker' property='page_no' value='<%searchActionForm.getCurrentPage()%>'>
    <logic:lessEqual name='searchSizeTracker' property='page_no' value='<%searchActionForm.getMaxPage()%>'>
    <logic:equal name='searchSizeTracker' property='page_no' value='<%searchActionForm.getCurrentPage()%>'>
    <jsp:getProperty name="searchSizeTracker" property="page_no"/>
    </logic:equal>
    <logic:notEqual name='searchSizeTracker' property='page_no' value='<%searchActionForm.getCurrentPage()%>'>
    <a href="<%=request.getContextPath()%>/performSearch.do?pageRequired=<bean:write name='searchSizeTracker' property='page_no'/>&action_id=<bean:write name='searchActionForm' property='currentActionId'/>&searchType=<bean:write name='searchActionForm' property='searchType'/>&currentScreen=search_reorder"><jsp:getProperty name="searchSizeTracker" property="page_no"/>
    </a>
    </logic:notEqual>
    </logic:lessEqual>
    </logic:greaterEqual>
    </logic:iterate>
    =========================================
    The above code sample seems to fail to get past the first <logic:greaterEqual tag even though the conditions are met. And the iterator just loops throught the rest of the SearchTrackerObjects.
    I'm not sure whether logic tags can be nested as shown???
    Thanks in advance.

    Yes you should be able to nest logic tags like that.
    However you seem to be wanting to limit the values that are iterated through using the greaterEqual and lessEqual tags.
    I would suggest you use the offset and length attributes on the logic:iterate tag:
    something like:
    <logic:iterate id="searchSizeTracker" name="searchSizeTracker" type="uk.co.troutlure.bom.SearchTrackerObject" scope="request" offset ="<%searchActionForm.getCurrentPage()%>" length="<%searchActionForm.getMaxPage() - searchActionForm.getCurrentPage()%>">Cheers,
    evnafets

Maybe you are looking for

  • When I load Windows 7 in Bootcamp it freezes saying partition is not formatted for NTFS(?)

    I have to set up a partition on my new iMac to get a piece of business software to load. I tried Crossover and Parallels. Set up a 250 GB partition in Bootcamp and things seemed to be going fine with the windows 7 Ultimate loading but then i get a me

  • UDF and Category mapping table name?

    Hi I have created UDF on the screen and categorized these UDF for the user convenient. Now i would like to know the table where the system store this mapping. Here i am attaching the mapping screen which table i needed. Kindly refer the screen shot i

  • Please give advice re: Design view !

    Hi everybody, I have just started work with a company that creates alot of web sites  using Deamweaver MX2004 (in design view) I am only experienced with using code view(mainly in CS4 and notepad++) The problem is that any sites I make will be diffic

  • Performance test in Flexcube

    Hi All, I really need your help. Is there any tools that can be used to do performance / Stress test in Oracle Flexcube? Does JMeter can be used to do that? Thanks for help. Taufix

  • Run startWeblogic.sh errors in production mode

    Hi, I am trying to run the following commands to start the admin server and managed nodes from the commandline on linux: domain_dir/bin/startWebLogic.sh & domain_dir/bin/startManagedWebLogic.sh managednodename http://localhost:7001 & By entering the