Formatting data values

 5 Replies
 0 Subscribed to this topic
 52 Subscribed to this forum
Sort:
Author
Messages
Bob
Basic Member
Posts: 7
Basic Member
    Hi all:
              I am well aware that all formatting of data should be performed on the presentation level, however, my end users do not want to perform the formatting themselves.  That being said, how can I format 2 data values within the assign node of PFI?  One field is the order quantity which should have the format of  [(Z,ZZZ,ZZ0)] and the other field is the order total in the format of [(Z,ZZZ,ZZ0.99)].  I thought about using SQL function of CAST, CONVERT, and MONEY data type to resolve this issue, but PFI returns cannot found MONEY data type and CONVERT function?  Is there any other way to deal with this issue?


    BarbR
    Veteran Member
    Posts: 306
    Veteran Member
      Lawson only delivers a very few javascript functions, as you can see by the limited drop-down list in the Assign node.
      You'll have to add those functions to the javascript functions file pflow.js, both in your client and on the server.
      BarbR
      Veteran Member
      Posts: 306
      Veteran Member
        Lawson only delivers a very few javascript functions, as you can see by the limited drop-down list in the Assign node.
        You'll have to add those functions to the javascript functions file pflow.js, both in your client and on the server.
        John Henley
        Posts: 3353
          You would be using JavaScript functions. PFI has the capability to custom and add to the delivered functions, so you would want to spend some time writing some quality functions (search for "JavaScript number formatting") and adding them to the pflow.js file on your client and server, keeping a copy as it may get overwritten each time an update for LSF9 and/or PF is installed.

          Thanks for using the LawsonGuru.com forums!
          John
          David Williams
          Veteran Member
          Posts: 1127
          Veteran Member
            The only way I've seen to do this is to write your own JavaScript function (and build them into pflow.js) and call them within the Assign node. You will have to assign your values to String variables within the flow. If you're exporting to Excel or another program, the values will more than likely pass as string values and you wouldn't be able to do calculations. If you're sending the values in an email, you should be fine with this formatting.
            David Williams
            SP
            Veteran Member
            Posts: 122
            Veteran Member
              I don't understand what the problem is here. If you are needing some float
              to appear without the decimal, then multiply by 100 and drop decimal
              portion (e.g. value_b=math.floor(100*value_a))

              I don't see the problem here.

              On Mon, Oct 31, 2011 at 11:21 AM, wrote:

              > [image: LawsonGuru.com Logo] <https://www.lawsonguru.com/> Lawson
              > ProcessFlow Forum Notification A message was posted to a thread you are
              > tracking. *RE: Formatting data values* Posted by: *ConsultDavidW*
              > 10/31/2011 10:15 AM The only way I've seen to do this is to write your
              > own JavaScript function (and build them into pflow.js) and call them within
              > the Assign node. You will have to assign your values to String variables
              > within the flow. If you're exporting to Excel or another program, the
              > values will more than likely pass as string values and you wouldn't be able
              > to do calculations. If you're sending the values in an email, you should be
              > fine with this formatting.
              > ------------------------------
              >
              > To view the complete thread and reply via your browser, please visit:
              >
              > https://www.lawsonguru.co...matting-data-values/
              >
              > You were sent this email because you opted to receive email notifications
              > when someone posted and/or responded to a message on this forum.
              > To unsubscribe to this thread please visit your user profile page and
              > change your subscription options.
              >
              > Thank you,
              > LawsonGuru.com
              >