Flatten property should not be quoted/escaped

OS info

  • Operating System : Windows 10.0.19044
  • Wappler Version : 4.7.2

Problem description

The property value is automatically enclosed with single quotes that are escaped causing a SQL syntax.

$_POST.record.flatten('\'id\'')

Steps to reproduce

  1. Add a Database Query action.
  2. Under Conditions tab, apply the flatten formatter.
  3. Enter a property.

output

How exactly do you enter this id property? Do you write it by hand?
If you write it by hand in the Property field then it’s considered a string, that is why it’s quoted.

Yes by hand. Otherwise, using the picker results in the following:

$_POST.record[0].id

If you enter it by hand you need to enter in code view of the data picker, not in the input directly as this way it’s considered a string.

If you have a problem selecting the property using the data picker, please open a new topic and report it there in details, so we can try to reproduce it.