2 Replies Latest reply: Jun 20, 2011 5:56 AM by Jonathan Dienst RSS

    Help with script...

    Chris Hopkins

      Hi everyone..


      I am trying to do something in my script but am unsure how to..


      I am loading in a table and two of the fields contained in the table are :



      [Stock Movement Reason Code]


      Narrative contains a mixture of system generated descriptions and user generated descriptions for stock movements

      i.e. Wastage, Stock Checking, Goods Receiving, Goods Returned etc

      Most stock actions (e.g. Wastage) have been assigned with their own Stock Movement Reason Codes (Wastage is 3), but some actions (e.g. Stock Checking, Goods Received) do not have their own code, so the system allocates a ZERO to them.


      Any SYSTEM allocated ZERO narrative will also have the date, time and user appended to the data.


      i.e. Stock Checking Variance, Mike, 20/05/11 14:21:24 whereas all other Stock Movement Reason Codes (Greater than ZERO) would be:  Stock Checking Variance (with no date /time stamp)



      In my app i can report all reason codes greater than ZERO, but i now want to show system codes (ZERO) also.


      I want to change the ZERO's to show a made up code instead.

      i was thinking of using a wildmatch if statement to say something like...


      if narrative = stock checking* give [Stock Movement Reason Code] 999

      if narrative = Goods Rece* give [Stock Movement Reason Code] 888



      So then i can select 999 and ALL stock checking variances will show.


      At the moment if i select [Stock Movement Reason Code] 0 the all system generated narratives will appear.


      Can anyone help??