Forum Discussion

AndreaF's avatar
AndreaF
Contributor III
2 years ago

Run a parametrised data management sequence from a dashboard

Hi all,

I have a data management step which is of "execute business rule" type, and make use of parameters so that when I run it, it prompts me to select the parameters. The parameters are "member dialog" parameters.

Now, since I want users to be able to run the step without giving them access to the Application tab, I am creating a dashboard that has a button in it to run the data management step.

I have built some combo boxes that use "member list" parameters, created a data mng sequence that contains the data mng step, and a standard button which runs the data mng sequence.

 

How do I pass the combo boxes selection to the data mng sequence?

Thank you

  • To give an update, I have been able to pass the parameters from the combo boxes to the data mng step via the standard button.

    One thing to consider and that I was initially getting wrong is that the parameters to pass must be the member dialog parameters, and not the data mng step parameters name.

    The following pictures will make it clearer.

    This is the data mng step:

     

    This does not work (using the data mng step parameter name):

     

    This works (using the member dialog parameter):

     

  • You can create a dashboard extender rule and do the following 

    Create a dictionary 

    Pass the combo box values to the rule.

    Dim strCMBValue as String = args.NameValuePairs.XFGetValue("whatyoupasswdasbuttonclick")

    Dim dictDMparams as New Dictionary( of string, strong)

    dictDMparams.Add("DMParam", strCMBValue)

    Brapi.utilities.executedmsequence(sequencename,  dictDMparams)

     

    • federicus's avatar
      federicus
      New Contributor

      Hi,
      can you please explain how to use/recall the dictionary in the DataManagement sequence ?

      • KarlT's avatar
        KarlT
        Contributor III

        The items in the dictionary are the parameters being passed. So you would reference the name using the usual |!DMParam!| format 

  • AndreaF's avatar
    AndreaF
    Contributor III

    To give an update, I have been able to pass the parameters from the combo boxes to the data mng step via the standard button.

    One thing to consider and that I was initially getting wrong is that the parameters to pass must be the member dialog parameters, and not the data mng step parameters name.

    The following pictures will make it clearer.

    This is the data mng step:

     

    This does not work (using the data mng step parameter name):

     

    This works (using the member dialog parameter):

     

  • Yes, if you are running it directly from the button, then yes it is way. Usually I prefer to use the dashboard extender rule approach as I can check whether the parameter is empty or whether it is materialized and then run the dm sequence. 

    • ckattookaran's avatar
      ckattookaran
      VIP

      No I think you are right. I don't know what I was thinking. Typing code from phone is also not helping. Yup you pass the parameter name as the name and then the parameter value as the value when calling a DM from dashboards.