1

JavaScript function inputs seem to be caching the arguments if the value is being used earlier.

Example

Use cases

Find students in schools with a name or with their ages or both together.

utterance 1

find students in the school with the name George.

then in it will invoke the function with (name as George and age as null)

utterance 2

find students in the school with ages 10.

then in it will invoke the function with (name as George and age as 10)

How to avoid caching of the variable name as George in the second case?

Community
  • 1
  • 1
user3926701
  • 313
  • 1
  • 5
  • 18
  • Solved! This issue by adding `features { transient }`to concept and for date time expression created customdatetime expression with role of viv.time.DateTimeExpression and added transient to features works – user3926701 Aug 22 '19 at 11:45

1 Answers1

2

Solved! issue by adding

features { 
transient 
} 

example of text concept

text (name) {
  description (name of the person)
  features{
    transient
  }
}

For DateTimeExpression created CustomDateTimeExpression with role-of viv.time.DateTimeExpression and added transient to features works.

structure (CustomDateTimeExpression) {
 role-of (viv.time.DateTimeExpression)
 description (wrapper for DateTimeExpression)
 features {
 transient
 }
}

links: https://bixbydevelopers.com/dev/docs/reference/type/text.features

sophros
  • 14,672
  • 11
  • 46
  • 75
user3926701
  • 313
  • 1
  • 5
  • 18