concatenate strings on assign node

 7 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
TracyO
Veteran Member
Posts: 97
Veteran Member
    I am sure this is really basic, but I can not figure it out.
    We had some processflows in 8.0.3 that we used the RD30 record to get an email address based on the operator ID.  Since the RD30 record no loner exists we decided that we would populate a user field on OE53 to hold the email address, however these user fields are not large enought to hold our entire email address, so we have only poupluated it with the persons name:  ie tracy.olson.  I have my processsflow pulling this piece from a query, but then I need to add @holidaycompanies.com to it for my email variable.  I have tried several different ways to concatenate the user field from my query and the hard coding for the reaminder.
    Here is what I have that does correclty pull in the name:
    Query5820_OPE_USR_FLD_05
    Then I tried
    Query5820_OPE_USR_FLD_05  & "@holidaycompanies.com"
    and
    Query5820_OPE_USR_FLD_05 + "@holidaycompanies.com"
    and
    "Query5820_OPE_USR_FLD_05 & @holidaycompanies.com"

    Can anyone tell me what I am doing wrong?
    Thanks
    Gary Davies
    Veteran Member
    Posts: 248
    Veteran Member

      The query of WEBUSER has been changed to a Resource Query node, if your 8.0.3 flow has the DME query to WEBUSER the script that converts them to 9.0 will automatically convert then to the Resource Query.  Change the flow back to the DME query and convert them to 9.0

      The email will now be populated on the LDAP.   If you do not have a process in place to update it there then you may have to go back to your user field option (or from HR11?).

      Otherwise  Query5820_OPE_USER_FLD_05 + "@holidaycompanies.com" is correct.. if USR-FLD-05 is a numeric you may have to put "" in front to ensure it converts to string as such

      "" + Query5820_OPE_USER_FLD_05 + "@holidaycompanies.com"

      thanef
      Veteran Member
      Posts: 47
      Veteran Member
        You can use the resource query node that is now in Process Flow Designer to query Lawson Security to get email addresses that way you wont have to worry about the string issue you are having.  Your query can look for the email address field on that record.
        TracyO
        Veteran Member
        Posts: 97
        Veteran Member
          I know we tried the Resource query node originally when trying to conver this flow and it was not an option for me. I will have to re address why I could not use it. I think it has something to do with going to DB2 adn the securtiy is not where I can get at it without Pflow Integratro. As for the string, the user field is alpha and when I assign it just as what was pulled from my query I do get the output of Tracy.Olson
          When I tried what Gary had noted above it does not work I get the following:
          Exception while evaluating expression: EMAIL = "" + Query5820_OPE_USER_FLD_05 + "@holidaycompanies.com";

          "Query5820_OPE_USER_FLD_05" is not defined.

          But when I use just
          Query5820_OPE_USER_FLD_05 I get:
          Email = TRACY.OLSON

          so it is returing the correct value from my field, I just need to get the @holidaycompanies.com concatenated to that.
          Gary Davies
          Veteran Member
          Posts: 248
          Veteran Member

            I assume you have a DME query called Query5820 that is called before you are trying to assign the value to EMAIL.  And EMAIL is defined in your start node.

            If you are creating the EMAIL variable at the time of assignment then you need to use:

            var EMAIL = .....

            TracyO
            Veteran Member
            Posts: 97
            Veteran Member
              Gary
              Yes EMAIL is a variable I have set up in my start node. I then have a DME queryagainst the table OEOPEUF to get my user field 5 data. Then I have an assign node, using the userfield 5 from the query. In the assign node if I put: Email=Query5820_OPE_USER_FLD_05
              it work oaky and does give me the correct valule from the user field 5 , but when I try to add the @holi..... then I get the error.
              Gary Davies
              Veteran Member
              Posts: 248
              Veteran Member
                You misspelled the field name  it should be Query5820_OPE_USR_FLD_05,  make sure your DME query is set to look for OPE-USR-FLD-05 as well.
                TracyO
                Veteran Member
                Posts: 97
                Veteran Member
                  Yes my assign node is looking for and finding
                  Query5820_OPE_USR_FLD_05
                  Before I try to attached the @holidaycompanies.com. I am getting data back. When I try to add the @holiday..... I get Email = 0
                  When I just do the assign I get Email = Tracy.Olson
                  so I have the field name correct in my queries & assign.