Author Topic: Wakanda query with dynamic attribute name in a variable  (Read 4529 times)

Offline Bastian296

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Wakanda query with dynamic attribute name in a variable
« on: June 11, 2019, 08:39:36 pm »
Please, take a look at following code:

var platNom = "apero"; // I set the value of my attribute in one variable

var monAttribut = ds.Convives.attributes[platNom]; //this works

var invitants = ds.Convives.query("$(this[platNom] == 'oui') ", {allowJavascript: true});// This does not work

Is there a problem in my syntax?

Offline JosephJennifer

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: Wakanda query with dynamic attribute name in a variable
« Reply #1 on: June 16, 2021, 08:56:31 pm »
A new feature in 4D allows you to add or insert new columns dynamically at  Array, Field, Variable, Nil pointer, ->, Column array name or field or variable.
TalkToWendys.com
« Last Edit: June 17, 2021, 09:08:02 pm by JosephJennifer »