" /> Use of wildcards in VAG scripts - Genesys CTI User Forum

Author Topic: Use of wildcards in VAG scripts  (Read 13634 times)

Offline René

  • Administrator
  • Hero Member
  • *****
  • Posts: 1832
  • Karma: 62
Re: Use of wildcards in VAG scripts
« Reply #15 on: August 13, 2007, 06:34:29 PM »
Advertisement
Cavagnaro,

Based on the documentation and release notes the option "filters-allow-wildcards-in-values" was added in version 7.5.

René

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Use of wildcards in VAG scripts
« Reply #16 on: August 13, 2007, 08:03:48 PM »
I believe that was launched in order to restrict the use of wildcards on filters, not to implement them as they were available. Maybe some data containing * and don't using it as a filter was the problem and fixed  with this option.

From statserver 7.0 users guide:

Use the wildcard character “*” (asterisk) in place of the value in filter
functions. PairExists(“Key”,”*”) would return 1 for true if any key-value
pair exists where the key equals “Key”, regardless of the value of that pair.

Offline cavagnaro

  • Administrator
  • Hero Member
  • *****
  • Posts: 7641
  • Karma: 56330
Re: Use of wildcards in VAG scripts
« Reply #17 on: August 13, 2007, 08:39:01 PM »
Oh ok my bad, you were talking more about the statserver option not the wildcard feature itself.
Sorry

Offline Kevin S

  • Full Member
  • ***
  • Posts: 145
  • Karma: 4
Re: Use of wildcards in VAG scripts
« Reply #18 on: August 13, 2007, 09:18:25 PM »
According to the description, the wildcard option was previously available, but it matched ANY instance.

This option permits you to get narrow it down to a subset.
For example, in the original posting, Mark was looking to use for any skillset starting with "IFA_".
Prior to 7.5, using PairExists("MySkill", "*") would give you any existence of MySkill. If it was used as part of a string - for example, PairExists("Password", "A*terisk") - it would take the * as a literal character within the string and not as a wildcard.

Post-7.5, you could do PairExists("MySkill", "IFA_*") to match anything starting with "IFA_", but it would not match the KVP (MySkill, "XYZ") because XYZ does not start with "IFA_"

Disclaimer: I have not tested the various permutations of what works and what doesn't - such as, would "A*terisk" match "Asterisk", "Abbterisk", "A12345terisk", etc. This is left as an exercise for the student.