Need help resolving a bug in query as its not returning expected response

Hi Guys,

I have a table called as ExCampaigns where I list all my campaigns. Campaigns have a campaign Owner.

In my front end I have a drop down selection to Select campaign owners and when we select them it writes into Ex campaign table under column called “SelectedManager”

I have a query Running on Table ExCampaign where filter criteria is “CampaignOwner” is “SelectedManager”

For Some reason I am not getting Right response though I have Selected Manager present in 7 Places
**Query response is giving me campaigns with no CampaignOwners in response, All my campaignOwners are present for all campaigns **

Is this some bug which is there?

Thank you for your help.

Regards,
Dilip

As shown in my second screenshot. My “SelectedManager” column is a user specific Text column

which only writes value to the first cell.

Is that creating any issue?

Regards,
Dilip

Am I right in my understanding that both the CampaignOwner and SelectedManager columns are in the same Ex-Campaign table? Also, it appears that your query is actually matching the CampaignOwner with the SelectedManager column in the same row. Is this right? If so the query result will vary based for each row based on what the value is for SelectedManager column in that row.

The problem is you are trying to do too much in the same table. If you are trying to track the list of all campaigns each user owns, then you need a child table that holds the Campaign ID and CampaignOwner (i.e if there can be more than one campaign owner for a campaign. Otherwise you can put it in the Ex-Campaign table itself). Then add a Campaigns Relation to the where you have to those campaign owners listed (say Managers Table). To sum up, you need a separate Managers table where the list of managers are listed and this is where the list of all campaigns owned by each manager should be collected as a relation column.

If you really need to see the list of all campaigns managed by the manager who is managing a campaign, add a lookup column to the Ex-Campaign table to pull the Campaigns column from the Managers table.

Yes you are absolutely right .

See what I want to do is in the query it should check the value I have selected from my choice component and then it should give a list of all campaigns where manager is the selected person.

Regards,
Dilip

See what I want to do is in the query it should check the value I have selected from my choice component and then it should give a list of all campaigns where manager is the selected person.

Where do you want to use this list of all campaigns managed by the selected person? On a form inside another dropdown? If so, it won’t work because your selection has not been committed to the table yet. Perhaps if you can show the relevant parts of the UI, we (the community) may be able to suggest some creative solutions.

I think I got the issue. Since my selected value is only recorded in the first row My query is not working.

As a hack for time being I am writing it as single value now.

I am just wondering how can I make it work When I am writing the selected choice into my campaigns table.?

Regards,
Dilip

Thank you for replying Raaj :slight_smile:

This is my UI where I am having a choice component

I am writing the values from this to campaigns table with column name

SelectedManager as shown in the figure above.

Since I am doing this it just records the value in the first column only so my query was not working.

Regards,
Dilip

How about replacing the dropdown with a “Assign Manager” button, which when clicked pops up a dialog that allow a manager to selected and submitted? That way, the selection will be committed to the current campaign and then the computed columns will be update automatically.

Hi Raaj,

My requirement is just to write the selected Manager so that I can use that in my query to list all campaigns assigned to the manager.

Having to do you method would introduce 2-3 extra steps for user right?

Regards,
Dilip

yes, what I suggested would require two extra clicks. BTW when you make a selection in your current implementation, is the selection getting setting saved to current campaign row that is being viewed?

Currently it is getting saved to first row of the column with name Selectedmanager

Regards,
Dilip

There should be only row per campaign, right? If so, shouldn’t selected manager for that campaign go into that same row.

The way Glide works is that ui elements are bound to a table or a specific row. So if you are editing the first row of a table, you cannot set or get information from another row in the table directly.