Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Confiform database multi-select and the Apply filter on field Confiform Rule for Field Definition

Fred Stubbe
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 19, 2020

I am using an 'Apply Filter on field' action in a Confiform Rule for Field Definition Macro.

I am attempting to filter results of a database multi-select field with filter results from another database multi-select. In the multi-select that is being filtered I get No Results Found. 

Question : Is it possible to filter down a multi-select with results from another multi-select in Confiforms ?

Here is the first Database select that is populating my first database multi-select called recoveryFunction

First Select Query   ( recoveryFunction database Multi-Select ) 

SELECT [InventoryItem_FunctionName] as functionid, [InventoryItem_FunctionName] as functionname,  [InventoryItem_ProductCodeDescription] as productname FROM [GAM].[dbo].[AllData] WITH(NOLOCK) WHERE [InventoryItem_ServiceLevelName] = 'Production' AND [Configurations_DisasterRecoveryLocationName] = 'OD2 - 2nd Omaha Data Center' AND ([Configurations_DisasterRecoveryLevelName] = 'MARC_1' OR [Configurations_DisasterRecoveryLevelName] = 'MARC_2') ORDER BY [InventoryItem_FunctionName] ASC

Here is the second Database select that is populating my second database multi-select called hostNames

Second Select Query  ( hostNames database Multi-Select )

SELECT [Hosts_HostName] as hostid, [Hosts_HostName] as hostname, [InventoryItem_ProductCodeDescription] as productname, [InventoryItem_FunctionName] as functionname FROM [GAM].[dbo].[AllData] WITH(NOLOCK) WHERE [InventoryItem_ServiceLevelName] = 'Production' AND [Configurations_DisasterRecoveryLocationName] = 'OD2 - 2nd Omaha Data Center' AND ([Configurations_DisasterRecoveryLevelName] = 'MARC_1' OR [Configurations_DisasterRecoveryLevelName] = 'MARC_2')

Here is the Confiform Rule for Field Definition Macro defintion that I have defined for field hostNames 

Rule to Filter

  • Field Name : recoveryFunction
  • Condition : !recoveryFunction:[empty]
  • Execute only on user Action : Checked
  • Action to Execute : Apply Filter on a field
  • Action Field Name : hostNames
  • Filter to Apply on a field : functionname:[entry.recoveryFunction.functionname]

Both of the database multi-select fields have a field titled functionname

1 answer

0 votes
Alex Medved _ConfiForms_
Community Champion
June 22, 2020

Have provided you with a detailed answer in our support JSD.

Here shortly: When you compile the queries for the fields you need to defined the "id" column, as the documentation strongly suggests. This is especially important (to make a row identifiable by ID, not by hash) when you need to filter things later with "apply filter on field" action

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events