How to traverse back in Mapping?

If the source delivers the data always in the same order, there's an easier way to achieve this.Within an Expression transformation, you can define variable ports which automatically are initialised to certain values. For example, a numeric variable port will always be initialised to 0 (zero), and strings will always be initialised to an empty string.Now with a small trick one can store the value of the trade ID from the first record and then simply use it from that time onward. This trick uses the fact that variable ports are always processed from top to bottom.Set up one variable port named "v_is_read" of type Integer with this expression:  TRUENow set up another variable port "v_trade_id" of the same data type as the TRADE_ID port immediately before v_is_read with this expression:  IIF( v_is_read, v_trade_id, TRADE_ID)Finally forward the value of v_trade_id as an output port ORIGINAL_ID. How does that work?When the very first record is processed, all variable ports are initialised, meaning "v_is_read" is set to 0 and "v_trade_id" is set to an empty string.Now all input ports are read from top to bottom.Next come all the variable ports. Because "v_trade_id" comes before "v_is_read", the variable port "v_is_read" still has its initialisation value of 0, so the IIF() function above will be evaluated by setting v_trade_id to the current value of the TRADE_ID port (which is the value of the very first input record).After that "v_is_read" will be set to TRUE (and will keep this value throughout the whole session run).Now for all following records the IIF() invokation will simply keep the value that's currently stored in "v_trade_id", and that is the value of the port TRADE_ID from the very first input record. This trick works perfectly with flat file sources and with relational sources which are sorted. Regards,Nico

Hi, I have a scenario like below: Source: Has three columns as below: Trade_ID,Trade_value,Route_ID101,10,NULL102,10,101103,10,102104,10,103105,10,104...So On. My Target Has 4 columns as below: The Original ID should be the Trade ID of very first record of source. Trade_ID,Trade_value, Route_ID, Original_ID101,10,NULL,101102,10,101,101103,10,102,101104,10,103,101105,10,104,101...So On. How to implement above scenario using mapping. Is it possible to traverse back until the first record in mapping.

Similar Messages

  • XSLT For-Each Issue, how to traverse back to previous node

    How to get the SupplierName(Primary) from the below payload
    *+<ItemSupplier>+*
    +<SupplierParty>+
    +<SupplierName>SUPPLIER NAME 1</SupplierName>+
    +</SupplierParty>+
    +<ItemSupplierLocation>+
    +<Status>1</Status>+
    +<PriorityCode>N</PriorityCode>+
    +</ItemSupplierLocation>+
    +<ItemSupplierLocation>+
    +<Status>2</Status>+
    +<PriorityCode>N</PriorityCode>+
    +</ItemSupplierLocation>+
    *+</ItemSupplier>+*
    *+<ItemSupplier>+*
    +<SupplierParty>+
    *+<SupplierName>SUPPLIER NAME 2</SupplierName>+*
    +</SupplierParty>+
    +<ItemSupplierLocation>+
    +<Status>1</Status>+
    +<PriorityCode>N</PriorityCode>+
    +</ItemSupplierLocation>+
    +<ItemSupplierLocation>+
    +<Status>1</Status>+
    +<PriorityCode>Y</PriorityCode>+
    +</ItemSupplierLocation>+
    *+</ItemSupplier>+*
    The condition i need to run is as below, but as the control will be inside the <ItemSupplierLocation> how do i go back to previous node and get the value of supplier name.
    +<ItemSupplier> can be n number+
    <xsl:for-each select="ItemSupplier/ItemSupplierLocation">
    <xsl:choose>
    <xsl:when test='PriorityCode="Y" and Status="1"'>
    <Supplier>
    <xsl:value-of select="ItemSupplier/SupplierName"/>
    </Supplier>
    </xsl:when>
    </xsl:choose>
    </xsl:for-each>
    Thanks,
    Vijay

    Fixed the issue with the below code
    <xsl:for-each select="ItemSupplier/ItemSupplierLocation">
    <xsl:choose>
    <xsl:when test='PriorityCode="Y" and Status="1"'>
    <Supplier>
    <xsl:value-of select="../SupplierParty/SupplierName"/>
    </Supplier>
    </xsl:when>
    </xsl:choose>
    </xsl:for-each>
    Thanks,
    Vijay

  • How can i get Google maps back on, i lost them with the ios6 update, the new maps are terrible

    how can i get Google maps back on, i lost them with the ios6 update, the new maps are terrible

    It's still not known if and when Google Maps becomes available in the AppStore. This is today's story: http://www.macrumors.com/2012/09/25/google-has-not-yet-submitted-a-google-maps-a pp-to-apple/

  • How do I get google maps back and turn on location services so I don't have to use your absolutely garbage maps

    How do I get google maps back so I don't have to use apples disgusting version of an attempt at a map

    You don't. You can use Safari and go to mobile Google maps and after opening that, tap on the arrow on the bottom of the page and save it to the homescreen. That will allow you to use Google maps web app on the phone. There is a rumor that Google is working on a stand alone app for the App store however no one knows yet if it has been submitted.

  • Apple IOS6 Maps a serious downgrade. How can I get google maps back!

    Apple IOS6 Maps a serious downgrade. How can I get google maps back?

    Try using this for the time being
    https://maps.google.com/

  • TS1702 How can I get google maps back??

    How can I get google maps back?????? Can I get google maps on android, can I get iTunes on android or will I have to close my account and copy all my music over?please help

    Do you own an actual apple product that you need help with?

  • How do I get google maps app back after I mistakenly deleted it?

    How do I get google maps app that came installed on phone back after I mistakenly deleted it ?  It doesn't show on my apps page since it was preloaded on the   phone ?  Is there a way to restore it without having to do a complete restore?

    Nope.  Power cycle the phone first (turn it off, then on) to see if it just needs to be rebooted.
    If not, it's not really that big of a deal.  Connect to iTunes, let it sync, click the "restore" button and let it restore.  When it asks if you want to restore your data back onto the phone, say yes, and when it's done, you'll be right where you are now plus the google map application and all your data. 
    What gets me is... how do you "accidentally" delete an undeletable system application?  The only way I know would be to jailbreak the phone, so, if it is jailbroken, be sure you can get it re-jailbroken, ( and unlocked if necessary) as well before it will be usable for the telephone function.

  • I hate the new Apple Map.  The directions are confusing.  How do I get google maps back on my iPad and iPhone?

    I hate the New Apple Map.  The directions are confusing and do not continue by pressing 'next.'  How do I get Google Maps back to my iPad and iPhone?  Thank you.

    Start Safari
    Enter the URL:  http://maps.google.com/#bmb=1
    tap "Go"
    Now that you have Google Maps up on Safari, tap the bottom center icon (box with arrow pointing to the right).
    Select "Add to Home Screen".
    You will now have a Google Maps icon on your iPhone/iPad/iPod Touch that will take you to Google maps.
    There are other map services available.  MapQuest, Waze, NavFree, OffMaps, etc...

  • TS1702 how do I change my MAPS application on my iPhone - the apple maps are poor and I want the google maps back

    how do I change my MAPS application on my iPhone - the apple maps are very fuzzy and not detailed enough

    You will need to delete that iCloud account on the device, then create a new one and login with the alternate AppleID.

  • How do I use Port Mapping?

    b How do I use Port Mapping?
    (This document will assume that you are using and ABS/AEBS/AX as an internet router and have DHCP & NAT turned on.)
    Sometime you may want to offer access to a computer on your AirPort network to users on the internet, whether it be a web site, or for file sharing, or just remote access for yourself when traveling. If any of these sound like something you want to do, then you need to understand how Port Mapping works.
    b AirPort as Firewall
    Most of the time your AirPort base station will not let any traffic into your network which did not originate from your network. It will let everything out and replies to your traffic back in, but it will not let sessions initiated on the internet side of the base station in to your network. This is what is referred to as the "NAT firewall" capability of the base station and it provides effective protection for your network from the internet. What Port Mapping does is poke a hole in this wall to allow certain type(s) of traffic into the network and direct this traffic to a specific computer on the network. In the firewall world this is commonly referred to as an "inbound proxy" or "inbound translation" rule or "PAT" (Port Address Translation) in the router world.
    b The Need for Manual Addressing
    Since a Port Mapping entry in the base station configuration requires an inside private IP address to be specified, the computer to which to mapping entry applies should always have the IP address specified in the mapping entry. Thus, DHCP should not be used for a computer offering services on the internet as the Port Mapping entry will no longer work if the target computer's IP address changes. In general, an Apple base station's DHCP server will try to assign IP addresses in the 10.0.1.2 to 10.0.1.200 range. IP addresses above 10.0.1.200 can be Manually assigned to computers and other devices on the network up to 10.0.1.254. 10.0.1.255 is reserved (it is the broadcast address for the 10.0.1 subnet). To Manually set up the TCP/IP information for a Macintosh running Mac OS X, go to System Preferences -> Network and "Show" the appropriate interface (Ethernet or AirPort) and click on the TCP/IP tab. Select "Configure Manually" and enter the following information:
    IP address : 10.0.1.201 (or whatever address you decide to use)
    Subnet mask : 255.255.255.0
    Router IP : 10.0.1.1 (the AirPort base station LAN IP)
    DNS server : 10.0.1.1, or whatever DNS server IP your ISP uses
    After making these changes verify that your computer can still access the internet and local resources on the LAN before continuing.
    b Port Mapping a service
    In our example we will be hosting a web site on a computer which we have given an IP address of 10.0.1.201. Basic web sites are accessed using the HyperText Transport Protocol (HTTP) and this protocol typically uses port 80 to communicate. In order for others to see the web site, we must configure a Port Mapping entry in the base station configuration to not only allow the web browsers in, but to tell the base station what IP address the web server is using. The Port Mapping entry has three parts: Public Port, Private IP, and Private Port. In this case you would use the following values:
    Public Port : 80
    Private IP : 10.0.1.201 (this is the computer hosting the web site)
    Private Port : 80
    In order to access the web site from the internet, users must reference the base station's WAN port public IP (determined by looking at the base station configuration summary page in the AirPort Admin Utility). Since this address may change over time, you might want to use a Dynamic DNS service to simplify connecting for your users.
    Sometimes the port you wish to use may be blocked by the ISP. In this case, use a different non-standard Public Port number for the service, but keep the Private Port standard. In the above example, if the ISP was blocking port 80, you could potentially use 8080 instead, so:
    Public Port :

    Public Port : 8080
    Private IP : 10.0.1.201
    Private Port : 80
    Your users would then have to enter "http://<publicIP>:8080/" (where <publicIP> is the public IP address of the AirPort base station) to access the web site.
    b Internal Access
    It should be noted that when accessing these services from within the network you cannot reference the Public IP/Public Port, but rather you must use the Private IP/Private Port. Thus, "http://10.0.1.201:80/" in the above example.
    b Limits and Options
    There is a maximum of 20 Port Mapping entries that can be made in an Apple base station configuration. If you use an AirPort Extreme or AirPort Express base station there is an option which can be helpful in the case where you need many ports opened to a single computer. This is the "Default Host" option. When using this it is not necessary to use Port Mapping at all as all ports will be opened to the specified "Default Host". This is found in "Base Station Options". The default IP address for the "Default Host" is 10.0.1.253. You may change this IP address. The target computer must be Manually configured as specified above with the same IP address. Since all ports are now open to this computer, you should enable and configure the Mac OS X firewall on the default host computer to protect it from intruders.
    b Useful Related Links
    <a href="http://docs.info.apple.com/article.html?artnum=52002>"Designing AirPort Extreme Networks: Manuals</a>
    "Well Known" TCP and UDP Ports Used By Apple Software Products
    IANA Port Number Assignments

  • How can I install Google Maps on IOS 6?

    Since I upgraded to IOS 6, Google Maps has been replaced by a poorer Apple version that doesn't support public transport. I want Google maps back. How can I install Google Maps on IOS 6 or downgrade to IOS 5?
    Thanks.

    Google Maps has not yet or does not look  like they are creating a standalone app at this time.
    It is not easy to downgrade, not recommended by Apple, very involved in order to do that. Again, not recommended.
    Use MapQuest for now if you are unhappy with Apple Maps. I was never happy with Google Maps, so I have been using MapQuest for a long time for all directions.

  • How to call the second mapping in the first mapping fails in the BPM

    Hi All,
    I have a scenario like this.
    There are two mappings. There is a one condition while genearying the root element of the first mapping. If this condition is not satisfies the first mapping will fail. If this mapping fails i want to trigger another mapping.
    How to achieve this functionality.
    If it is possible with BPM. how to call the second mapping in the BPM.

    Hi
    you can not create the containter for the synchronous interfaces.
    you have to craete the two asysnchronous abstact interfaces .
    thenusing those two abstract interfaces you have to define the containers in the BPM.
    and you also have to define the interface mapping b/w those two abstract interfaces.
    once you define the interface mapping you will be able to select the interface mapping using the transformation step in BPM.
    once you select the interface mapping in BPM then you will be able to selece the interfaces
    if you still face the problenm please reply me back.
    Thanks
    Rinku Gangwnau

  • How do I repopulate my maps with red pins from my bookmarks?

    How can I repopulate my map with red pins from bookmarks? From Bookmarks I can drop one pin at a time which is useless. I need all of my pins back on the map.

    Suggest that you take a look at the excellent resource provided by Time Capule / Time Machine guru Pondini.
    http://web.me.com/pondini/Time_Machine/FAQ.html
    See # 14
    If you are not comfortable with this,I  would also suggest that you consider havng a qualified Apple repair shop perform this for you.

  • HT4623 updated in error! how to go back to ios5?

    My daughter updated my iPhone to ios6 by mistake. I had been holding back from upgrading as I don't want to lose Google Maps. Could someone tell me how to go back to ios5? Thanks.

    Sorry braisim. - as has been said by AnaMusic there is no way to downgrade unfortunately.
    There have been a number of threads in this forum about this, i would link you to one in particular which would answer many of the questions you and others have had but apple saw fit to delete it because... well because they did. Someone will come along and tell you it was because it became a whining thread - I believe it's because apple and many here want people like you to think you are alone and being unreasonable.
    Google will be along soon with a new app we hope
    For now try the Nokia map app called "here" - its not as good but certainly much better in function and accuracy than apple maps
    Good luck

  • How to roll back changes made by other user in nwdi?

    hi all
    my doubt is.
    if there are errors in the WD NWDI project (cause developer before me had deleted/ added some of the code which is causing those errors).
    how to  roll back the code changes which were made by other user.
    i think through sync option but  when we sync to a earlier date we cant check out the code to make changes.
    help me.

    thanks rohit.
    but if there are changes in the context, i mean if one more attribute is created and it is been used a UI element.
    then the above process works.
    My doubt is.
        src folder(configuration,packages,mimes)
    Will these file contain all the code including  the context attributes and the mapping informatin and every thing else.
    (except Libs)???????
    can you plz tell me where the context attributes and mapping informantion and source code and model information are stored (in which folder).
    thanks in advance

Maybe you are looking for

  • GeForce4 MX using DVI to S-VIDEO / Composite Adapter

    Hi peoples, I'm running a PowerMac G4 Dual-867MHz MDD, with nVIDIA GeForce4 MX Video card. I want to connect this PowerMac to the TV, so I bought the DVI to S-VIDEO/Composite, to find out that it doesn't work with this video card. My question is; is

  • How do I get apple supervisors to return calls

    I had an issue with my ipad 3 around christmas that required me to wipe my ipad and start over.  I went to the trusty cloud and tried to download my backup into my ipad.  I bought extra cloud storage and didn't ever back up to itunes.  I thought it w

  • My apps quit on lunch. plz help me.

    i just update OS to 7.0.4. after that i can't use my apps. they quit on loading. plz help

  • Using WITH clause in PLSQL

    Hi all, I am getting ORA-00928 error [missing SELECT statement] when running below statement. Is 'WITH' clause allow in PLSQL? -- Created on 26/12/2007 declare   -- Local variables here   i integer; begin   -- Test statements here    WITH x AS (     

  • What i can do

    Please help me, my iphone in the problem, and go to the nearest service center for Apple, and I am in saudi arabia "Riyadh, there is no branch of apple never, I hope the solution, there is a problem in your iphone , if the solution is to put my iphon