Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Possibility to use String Function in the DJLabel Field #360

Open
pgrill79 opened this issue May 26, 2024 · 2 comments
Open

Possibility to use String Function in the DJLabel Field #360

pgrill79 opened this issue May 26, 2024 · 2 comments
Assignees
Milestone

Comments

@pgrill79
Copy link

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
Copy link
Contributor

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
Copy link
Author

pgrill79 commented Jun 4, 2024

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.

@aeberhart aeberhart self-assigned this Jun 6, 2024
@aeberhart aeberhart modified the milestones: 5.2, 5.1.30 Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants