Skip to main content

Search

Search

Using preprompt/postprompt value for VBscript

Comments

11 comments

  • Avatar
    Peter Thane

    It looks to me that the VB is running before the values have been set. Try adjusting it to an Event Controlled Script field and run the VB OnPostPrompt, ie after the other values have been specified. 

    I dont believe you will be able to display this on the Data Entry Form however.

    0
  • Avatar
    kerry washington

    I have adjusted the vb scripts to be event controlled OnPostPrompt but still having the issue. Please keep in mind that the 2nd script vbscript runs off the value calculation from the (AMT'S) addition to the (SUB) field. Thanks the quick response

    0
  • Avatar
    kerry washington

     

     

    0
  • Avatar
    kerry washington

    How do I tell  to run (ie) after the other values have been specified? 

    0
  • Avatar
    Peter Thane

    It looks like you need to run the Cdbl commands separate to the addition. 

    I have also set the final addition to be processed OnIdenticalCopies so that it is after the other two OnPostPrompt commands have been run:

     

    0
  • Avatar
    kerry washington

    That worked perfectly, Thank you.
    I'm also needing to now have the calculation total of this field show a discounted percentage before in a new field labeled (DIS) and then s displaying the final value in a new field labeled (TOT).

    0
  • Avatar
    Peter Thane

    You could just copy and paste this Sub field, as above,  and then add the new VB lines to the existing VB script such as 

    Value = Value * 0.85 

    for example for a  fixed15% discount 

    0
  • Avatar
    kerry washington

    Hi Peter it won't work. Please keep in that the (SUB) has its own field and that the discount has its own field that would reflect how much was saved and another field that would hold the total of all

    0
  • Avatar
    kerry washington

    Thanks for your lighting response time

    0
  • Avatar
    Peter Thane

    I dont know your label and what field is called what. You just need to make sure that the discount VB is run after the appropriate full amount has been calculated by any other VB routines, even if that means adding copying some code from another field and then adding to it to guarantee this

    0
  • Avatar
    kerry washington

     

     

    Happy Holidays Peter. I added another zebra printer to my phone for Bluetooth printing an I keep getting this same message an I’m not sure why since it’s the same model of printer. This happens while using print portal app

    0

Please sign in to leave a comment.