Skip to Content
0
Aug 31, 2023 at 10:31 AM

SAC APP Designer - How to read selected value in a dimension cell

120 Views

Hi,

I'm not able to achieve the below requirement, hopefully someone has a solution if it's possible in SAC.

Requirement:

When I click on a cell in a table, I would like to get the value in order I can pass it in an URL (in my case it's a dimension).

Example:

I have a table with purchase order number, it's cost object and the related purchase request number.

If I click on a purchase order number in the table, I would like to call the webgui URL to display the purchase order so I need to get the value of the selected cell.

Same should apply if I click on the cost object number and the purchase request number.

image.png

Current solution:

So far in a table I can add only 1 hyperlink and I use it for the PO number.

In my table, for the event onSelect, I define the below code but it works only for 1 dimension (where ever I click in the table it will get the value of the cell of the dimension purchase request number).

var vSelection = Table_2.getSelections()[0];

console.log(vSelection);

var vSelData = Table_2.getDataSource().getResultMember("PURCHASEREQUISITIONID", vSelection).description;

console.log(vSelData);

var vURL1 = "https://myurl.com/LAUNCHPAD#ZMM_PurchaseRequisition-manage&/PurchaseRequisition/";

var vURL = vURL1.concat(vSelData);

console.log(vURL);

NavigationUtils.openUrl(vURL, true);

Attachments

image.png (94.2 kB)
image.png (93.9 kB)
image.png (93.9 kB)