Auto filtering database field

Andrzej January 15, 2025

Hello,

 

I need some help to filter/narrow down the output from the 'database advance field'.

I tried several ways like 'Applying filter on a field' or using smart classifier but it's still not working as expected.

Let's say I have some workers and I need to assign the proper manager to the given employee. How can I do it?

My sql statemant to retrives all employee (based on selected employee I need to assigne proper manager).

The scond field shoud also be dropdown or auto assigning value.

 

 

 

Przechwytywanie21.PNGPrzechwytywanie50.PNG

2 answers

Suggest an answer

Log in or Sign up to answer
0 votes
Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 15, 2025

Are you able to create your SQL query for the DB field in a way that it also selects a manager from the database?

Something like (pseudo SQL)

SELECT employeeId as id, employeeName, managerId FROM...

Possible?

Andrzej January 15, 2025

yes, not problem at all 

Select DISTINCT [Employee Name] as id, [Employee Name] + ' (' + [Employee MPK] + ')' as Employee, [Employee Manager] as ManagerID from Employee
Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 15, 2025

In this case you already have the data in the first field

Assuming you call it employees (ConfiForms Field name)

Then you can always access the manageID via (ConfiForms Field macro, for example)

employees.managerid

Or via (in expressions)

[entry.employees.managerid]

 No need for an extra field (definition)

Andrzej January 15, 2025

something like on the below screen? Sorry for question like this but I'm noob in this tool yet

 

Przechwytywan12ie.PNGPrzechwytywan22ie.PNG

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 15, 2025

No, sorry.. absolutely not

You really DO NOT need an extra ConfiForms Field Definitiuon for the manager

You already have this data accessible through the "employees" field

When you want to view your data, for example through the TableView

You can add a ConfiForms Field macro with a field name set to be employees.managerid to access manager id value (directly through the employees field)

 

Andrzej January 15, 2025

Where can I put such expression in ConFiForms Field macro?

And will it be visable in the form and also table? As for now I'm not able to see this field with ManagerID in the form/table while using ConFiForms Field macro

Przechwytywani33e.PNG

 

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 15, 2025

You put there 

WybierzWakat.managerid

Andrzej January 15, 2025

Still dosen't appear in the form and table at all 'ConFiForms Field macro' and not filtering. :/

Here is the set up again:

 

Przechwytywa213nie.PNGPrzechwytywani222e.PNGPrzechwytywa113nie.PNG

 

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 15, 2025

Sorry, what should I be able to read from that picture?

It should be WybierzWakat.managerid, not WybierzWakat.ManagerID

See the description for the database field

Screenshot 2025-01-15 at 18.04.48.png

Also, take a look at https://wiki.vertuna.com/display/TEST/Database+dropdown+with+extra+fields+in+a+table 

It shows how the extra field "link" is accessed...

Same approach I was suggesting for you

Like Andrzej likes this
Andrzej January 15, 2025

ok, I think i made one step forward. This is not displaying as I'm not placing ConFiForms Field macro in the TableView but in ConfiForm Form Definition. 

But when I place the form with the employees.managerid info in the table view my form is limited only to this column. Do you know maybe how to work around this?

 

Alex Medved _ConfiForms_
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
January 15, 2025

You will need to put ConfiForms Field macros for every other field you want to show in a view (TableView or any other)...

Like Andrzej likes this
Andrzej January 15, 2025

thanks a lot, really 

0 votes
Sahir Maharaj
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 15, 2025

Hello @Andrzej

To dynamically filter and assign the appropriate manager to a selected employee, you can create a dependent dropdown field or use a smart classifier in your database interface.

I recommend to write a SQL query that retrieves the manager based on the employee’s department or role, ensuring the output is limited to relevant records.

If this setup isn’t functioning as expected, double-check the query logic and ensure the filtering criteria match the database schema.

Andrzej January 15, 2025

Hello @Sahir Maharaj can you tell me more or less how the sql query should looks like inside this smart classifier? How can I refer to another field from the form in such sql query? 

 

And dependent dropdown field is called in this case 'Dynamic dropdown (Database)'?

Here also I should use sql but I don't know how to refer to the existing field and filter based on the earlier entered value.

TAGS
AUG Leaders

Atlassian Community Events