Data Infrastructure Management Software Discussions


User Input Query Multi-Select Error

I'm trying to gather multiple values from a user input query selection. Here is an example selection:




And here is the query behind it:


    logical_interface.address AS address,
    logical_interface.protocols AS protocols, AS test_broadcast_domain  
    cm_storage.cluster cluster,
    cm_storage.vserver vserver,
    cm_storage.logical_interface logical_interface,
    cm_storage.broadcast_domain broadcast_domain,
    cm_storage.ipspace ipspace  
WHERE = '${ClusterName}'          
    AND = '${SourceVserverName}'          
    AND vserver.cluster_id =          
    AND logical_interface.vserver_id =          
    AND broadcast_domain.ipspace_id =          
    AND ipspace.cluster_id =          
    AND != 'Cluster'          
    AND NOT IN (
            cm_storage.vserver vserver,
            cm_storage.ipspace ipspace                  
   = '${SourceVserverName}'                          
            AND vserver.ipspace_id =          


Judging from the variable values this gives me exactly what I want - I can split the string on '~' and pull out the values I need. The problem is I'm getting an error in planning:


"The value smv1_lif1~,cifs~SE-Lab240-Test,smv1_lif2~,cifs~drtest for input $SourceVserverNetworkInterfaces has to be within [smv1_lif2~,cifs~SE-Lab240-Test, smv1_lif2~,cifs~drtest, smv1_lif1~,cifs~SE-Lab240-Test, smv1_lif1~,cifs~SE-Lab241-Test, smv1_lif1~,cifs~drtest, smv1_lif2~,cifs~SE-Lab241-Test]"


The values are included in the specified set. I also tried just selecting one value, but the results are the same. What am I doing wrong here?


WFA v4. build 4759965




Re: User Input Query Multi-Select Error

I thought I had a workaround by creating a table and using queries within, but unfortuantely I ran into an issue with that too. So now I have two potential ways I could do this that are somewhat elegant and neither work due to WFA bugs. Smiley Sad


Re: User Input Query Multi-Select Error

To get a single column from the result you can use the SplitByDelimiter function:



I guess using multiple rows as an input for a command will be difficult. Usually it is done with iterating through the results with row repetition:




Re: User Input Query Multi-Select Error

The problem is that one of the keys (protocols) has commas in its data, and WFA cannot distinguish between the commas in the data and the commas that separate its records.  A workaround would be to replace the commas in the protocols data with a safe character (like ":") in the SQL SELECT statement, and replace them back before passing them to a command step.


By the way, there are certified functions (getValueAt, getValueAt2D and getColumns) to deal with multi-query variables.  The are not functionally different from splitByDelimiter, but since they are made just for this purpose, might as well use them.





Check out the KB!
Knowledge Base
All Community Forums