dashjoin / platform

Dashjoin Is an Open Source & Cloud Native Low Code Development and Integration Platform that helps teams deliver applications faster 🚀 Uses a data-driven approach inspired by Linked Data to make use of your existing assets
https://dashjoin.com
GNU Affero General Public License v3.0
89 stars 7 forks source link

Possibility to use String Function in the DJLabel Field #360

Open pgrill79 opened 1 month ago

pgrill79 commented 1 month ago

image

Would be great if you can use String function in this field. The use case is that e.g. we want to remove leading zeros or do other string manipulations to the value of the field

aeberhart commented 3 weeks ago

this is actually not that trivial. The problem are the autocomplete cases. Assume, you have a label that is set to the employee name. When you edit a filter or a foreign key for employee and start to type "smi", a DB query select from employee where name like "smi" is run in order to return DB matches with the prefix "smi" (Smith, Smitts, etc...)

Can you provide a couple of examples? There might be a feasible compromise.

pgrill79 commented 3 weeks ago

E.g in our usecase we have the origin of an animal (e.g.:) CH and the eartag, which is stored with leading zeros. in the label i havce ${Origin}${Eartag}, but the eartag is stored in the DB with leading zeros, but should be displayed without the leading zeros. (in the meantime this is no issue anymore, as we removed the leading zeros also in the DB.

But another example is e.g. we have in the DB the Farm Name, and Lastname and Firstname of the Contact Person. in the Label i have ${Name}, ${Lastname}${Firstname} . But as the Name can be Empty, sometimes it shows: ", Grill Patrik" - so in that case i would need to remove the , at the beginning and do a trim.

But this has no high prio.