SQL Table Editor - Set selected record from a rule?

SeanV
New Contributor III

I have a SQL Table Editor on a dashboard, I would like a row to be "pre-selected" from code instead of through a user action (manually clicking on the record).

Is this possible?

 

13 REPLIES 13

NicolasArgente
Valued Contributor

Hi @SeanV 
I do not exactly understand your request. Please could you be more specific and even show so print screen.
Hope it will help the community to help you.
Thanks

Connect with me on:
LinkedIn: https://www.linkedin.com/in/nicolas-argente/
Website: https://aiqos.io
If you want to lift yourself up, lift up someone else.

SeanV
New Contributor III

I have a SQL Table Editor on a Dashboard and a button.    Users select (click on a row/record) on the SQL Table Editor then click the button.  The button runs a Dashboard Extender rule that does "stuff" based on the selection from the SQL Table Editor.  Once the rule has run the SQL Table Editor is refreshed so that the action of the rule is shown.  However when the SQL Table Editor on the dashboard is refreshed, the record that had been previously selected/highlighted isn't selected/highlighted anymore (it has lost its focus).  I would like to "automatically" return focus to the previously selected record so that the User doesn't have to click on it again.  It would be "pre-clicked" or "pre-selected".

I'm not sure you can do that. However, you can set the parameter value the SQL editor is bound to and achieve similar results. That could lead to other issues if you are not actively clearing the parameter since it'll always remember your selection.

IBK
New Contributor III

Hello,

I have a similar requirement where the Bound Parameter has to return a comma delimited list of the selected row column. The bound column has been defined in the sql table editor. I also have a Supplied Parameter to collect the selected rows and pass it to the bound parameter and then to a BR for further processing. I am not sure how to format the Delimited list. Any help would be appreciated.Picture1.pngPicture2.pngPicture3.png

RobbSalzmann
Valued Contributor

Use  square brackets ] around the parameter name that you want a delimited list from:

{DBExtenderName}{FuncName}{CommaDelimitedListOfValues=[|!pm_multipleValuesParam!|]}

Then inside your BR, parse the comma seperated list into an array or list, whatever suits:

Dim arrValues As String() = args.NameValuePairs.XFGetValue("CommaDelimitedListOfValues", String.Empty).Trim().Split(","c)

RobbSalzmann_2-1691362113079.png

IBK
New Contributor III

Hi Robb,

Thank You very much. But one question I have is when I declare the Parameter what should I use for the Display Items and the Value Items? Right now I have it blank. But I think that is an issue.

Thank You,

Indu

RobbSalzmann
Valued Contributor

Bound list and Member list combo boxes don't seem to want to display the default parameter value by default.  I think there is an enhancement request in the works for this, since last ~April.

You can set the value of the parameter bound to the combobox in a BR before displaying the dashboard with that combobox - this will cause it to display what you want.

IBK
New Contributor III

So it is ok to leave it blank? I dont need to display it but pass it to the buttonClick as you have shown it in the post before.

 

Thank You,

Indu

IBK
New Contributor III

Hi Robb,

Thank You. But I am still not getting the value of the Delimited list into the BR. I think I am not defining the parameter correctly.  Is this correct? Thank You once again.

IBK_0-1691510019291.png

 

RobbSalzmann
Valued Contributor

Try setting your parameter type to "Input Value".  

IBK
New Contributor III

Actually I left it as input but I cleared the parameter bound to the button . It worked and of course we have to use the square brackets to get into an array. Thank You very much for all your help.

RobbSalzmann
Valued Contributor

Ah!  Nice work.  You're right, Input.  I updated the post above to fix that.  I was thinking Input and somehow typed "Literal".  Glad you got it working.

SeanV
New Contributor III

FYI.  This should really be in its own thread.