Skip to Content

SAP C4C - How to trigger absl script when a row is selected in AdvancedListPane?

Hi Experts,

I need to develop a scenario where I need to hide some UI elements (Not in the Preview pane of ALP) whenever there is a specific text in "first column" of the selected row in ALP.

What I have tried:
Created an action that triggers using Event Handler on "OnValueChange" of the first column's data element which acts as deciding parameter.
Inside the custom action, I have made an indicator true or false depending on the value of first columns selected value.
Then in UI designer, under properties(of the element I need to hide), I selected Visible as Advanced and under Calculation Rule, wrote code to check the indicators data element I set earlier in the script to toggle the elements visibility true or false.

The Problem with my approach :

The script does not trigger when a new row is selected in ALP.

I don't get why the script is not getting triggered even if I have an event handler set that triggers my custom action. Please help me if I am missing something obvious here.

Any help would be appreciated.

Regards,
Akash

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Apr 11, 2018 at 02:33 PM

    Hi,

    Since the trigger for the script is on value change of first column's data. it will trigger only when data in first column changes.

    I do not get why it would trigger on the row selection as it is not set up for row selection.

    If you need an event triggered on a row's selection then

    1) Make sure you maintain list type as singleselect in ALP properties

    2) Go to Data Model ->Select the ALP DataList -> Select @HasLeadSelection field -> On properties tab, call eventhandler1 for OnValueChanged event

    When user selects a row -> @HasLeadSelection get the row id of the selected row. As any other row is selected, the row id changes and therefore OnValueChange event triggers.

    Create eventhandler1 in the controller where you use 1) Assign operation and assign the selected row's any column's data to a custom field/other field in Root or data list & then 2) Use "BOAction" operation & assign to your action.

    In the action you use the logic based on the data from selected row's column of interest that was assigned to a customer/other field in Assign operation

    This will make sure that you always get the value of interest from selected row in your eventhandler.

    Please mark the Answer if this solves your problem.

    Thanks & Regards

    Suchita

    Add comment
    10|10000 characters needed characters exceeded