The M-Files Community will be updated on Tuesday, April 2, 2024 at 10:00 AM EST / 2:00 PM GMT and the update is expected to last for several hours. The site will be unavailable during this time.

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

VBscript If statement

Hello just want some advise on my script below.

I just want to raise some error on 2 if conditions, the 2nd condition is working (Datediff).

But the frequency has a problem. I think it's due to the Frequency property Date type is a value list.

Condition

 If Frequency property is "Every 1 hour" it should raise an error

Thank you.

Parents
  • Please check, content of szFrequency, should be exact same string.
    I suggest use Value List ID instead of string. This ID can be get with this code:

    'Get choosed ID from single select Lookup
    intPDProplookup = CInt(oPropVals.SearchForProperty( iPDProplookup ).TypedValue.GetValueAsLookup.Item)

    And then in If statement compare Integers

  • Thank you that work well on my one script. But i can't seem to figure out what is wrong with my script here.

    My If condition is if the value is "Driver's license" , then the len and isnumeric should be followed.

    Thank you.

Reply Children
No Data