This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Automatic Computed Value of Properties through VBScript

Hi,

Good day to all!  May I ask if there a VBscript for my concern. I have Property A and Property B in my forms, and I want the value of Property B to be based from Property A multiplied by 0.42

Thanks in advance!

BR,

Sonnie

Parents
  • Had similar case where I needed to calculate amount including VAT. You can use the script with a few adjustments.

    'Script for calculating invoice amount + VAT, automatic value
    Option Explicit
    Dim iPDAmount : iPDAmount = Vault.PropertyDefOperations.GetPropertyDefIDByAlias("PD.Amount")
    Dim iVAT : iVAT = 25 'percentage of VAT
    Dim szAmount : szAmount = PropertyValues.SearchForProperty(iPDAmount).TypedValue.DisplayValue
    'err.raise mfscriptcancel, szAmount & "  " & szAmount * ("1," & iVAT)
    if not szAmount = "" then
    	Output = szAmount * ("1," & iVAT)
    end if

  • Hi,

    Thanks for this done some adjustments and it works. 

Reply Children
No Data