How to retrieve data on a selected row from a grid view inside a dashboard by clicking a button

seangly
New Contributor III

I am looking to extract the data of a selected row in a grid view by click a button inside a dashboard;

seangly_0-1701459068335.png

 

2 ACCEPTED SOLUTIONS

Ah okay, I understand now.

You can do something similar with the bound parameters, however, with the grid view you can only have one column as the bound parameter so you would need to have a Row ID or unique identifier for each row in your grid view:

MarkBird_0-1701772239980.png

You would then pass through the row ID parameter to your business rule the same way as before:

{MyBusinessRule}{DrillToSourceFunction}{rowID=|!Selected_RowID!|}

View solution in original post

Hi @seangly 

Had another thought on this....

If you don't have a column in stage that that uniquely identify each record in stage then you can just create a column in your data adapter that is a concatenation of the key columns in your table. E.g. (Account|Entity|Flow|UD1...) and set this as the column for the bound parameter.

(Hide the column using column formats)

In your business rule, you can extract this information using a string.split e.g.:

Dim items() As String = rowID.Split("|")

Dim sAccount As String = items(0)
Dim sEntity As String = items(1)
Dim sFlow As String = items(2)
Dim sUD1 As String = items(3)

 

View solution in original post

5 REPLIES 5

MarkBird
Contributor II

Hi @seangly 

Does your question relate specifically to to refreshing the stage data grid on the button click? Or are you asking for detailed steps on how to do it (looks like you are almost there with that screenshot)?

Very high level, the steps are as follows:

1) Setup navigation/bound parameters on the cube view (this will help tell your SQL query the selected cell's POV)

MarkBird_1-1701683775120.png

2) Create a data adapter to retrieve the data (here is an example of how you can call a business rule data adapter)

{TXN_HelperQueries}{GetDrillBackData}{wfProfile=|WFProfile|, wfPeriod=|WFTime|, Scenario=|!ScenarioNavLink!|, TimeParent=|!TimeNavLink!|, EntityParent=|!EntityNavLink!|, AccountParent=|!AccountNavLink!|,UD1Parent=|!UD1NavLink!|,View=|!ViewNavLink!|}

MarkBird_2-1701683841928.png

3) Configure the button to refresh the drill back dashboard on button click

MarkBird_0-1701683741219.png

Hope this is helpful, happy to provide more details on any of the steps that you're struggling with.

Mark

seangly
New Contributor III

Hi Mark,

Thank for your reply.  I have completed that portion using the link to get the correct data to get to source.

Here is the next step I am trying to accomplish.  Once the drill back to Stage data (Workflow) come back with the data source, I am displaying the value into a grid view the:

seangly_0-1701747834978.png

Now, when the user selects a line in the grid view (which is the result of the drill back to Stage data) and click on that button.  I would like to get values from that selected line on the grid view (Account, Entity, UD1, etc.) so I can build me request to drill back to the source (e.g. Oracle EBS).

seangly_1-1701748084999.png

I hope that clarify what I am trying to accomplish.

Thank

Ah okay, I understand now.

You can do something similar with the bound parameters, however, with the grid view you can only have one column as the bound parameter so you would need to have a Row ID or unique identifier for each row in your grid view:

MarkBird_0-1701772239980.png

You would then pass through the row ID parameter to your business rule the same way as before:

{MyBusinessRule}{DrillToSourceFunction}{rowID=|!Selected_RowID!|}

Hi @seangly 

Had another thought on this....

If you don't have a column in stage that that uniquely identify each record in stage then you can just create a column in your data adapter that is a concatenation of the key columns in your table. E.g. (Account|Entity|Flow|UD1...) and set this as the column for the bound parameter.

(Hide the column using column formats)

In your business rule, you can extract this information using a string.split e.g.:

Dim items() As String = rowID.Split("|")

Dim sAccount As String = items(0)
Dim sEntity As String = items(1)
Dim sFlow As String = items(2)
Dim sUD1 As String = items(3)

 

seangly
New Contributor III

Hi Mark,

The bound parameter work when I tried with amount (I dont rowID as I am querying against a view in the database).  I wasn't really satisfied with using the amount field as we might have same amount but the mechanic of bound parameter work.

With concatenating several fields, it provides us with unique combination (same as unique key) that will work fine.

Thank for your advice on this one.