70
Views
6
Comments
Solved
notification count logic

When i click on bell icon the list will apper

and when i click on one record the count should be update(As starting count is 8 when i click on

one record count should be 7)

2023-01-17 13-43-47
Akhila K Soman
Solution

Hi Nikhil,

Not clear with the requirement.But you could add a flag like "IsSelected" in the aggregate to check the list item is selected or not. You can toggle the flag depending on the selection or deselection and thereby altering the count.

For example the following aggregate "GetMarks2"  is used to populate the list. Here an attribute called IsSelected is added and its default value is set to false.

On the OnAfterFetch event of the aggregate GetMarks2OnAfterFetch client action is called. Here  the aggregate is filtered based on IsSelected set to False and then the length of the ListFilter is assigned to the Count variable.

Count variable is passed as the input to the Iconbadge.

Add an input parameter in the ListItemOnClick action to pass the CurrentRowNumber selected or deselected.

Update the IsSelected attribute of the Row Selected based on select or unselect and call the GetMarks2OnAfterFetch client action again.

Result:


Hope this helps.

Thanks,

Akhila

UserImage.jpg
Nikhil Chopade

Thank you for sharing the idea,I will try this in my application


Thank you

2023-08-28 07-00-10
Paulo Torres
Champion

Can you explain better or share the oml?

2024-12-19 07-54-27
Aditya Chinchole

Hi Nikhil,

Can you please share oml!

Regards

2022-07-03 17-24-08
Sourabh sharma

Hi nikhil shriram

for the better solution plz share the OML if it is possible ..


2023-01-17 13-43-47
Akhila K Soman
Solution

Hi Nikhil,

Not clear with the requirement.But you could add a flag like "IsSelected" in the aggregate to check the list item is selected or not. You can toggle the flag depending on the selection or deselection and thereby altering the count.

For example the following aggregate "GetMarks2"  is used to populate the list. Here an attribute called IsSelected is added and its default value is set to false.

On the OnAfterFetch event of the aggregate GetMarks2OnAfterFetch client action is called. Here  the aggregate is filtered based on IsSelected set to False and then the length of the ListFilter is assigned to the Count variable.

Count variable is passed as the input to the Iconbadge.

Add an input parameter in the ListItemOnClick action to pass the CurrentRowNumber selected or deselected.

Update the IsSelected attribute of the Row Selected based on select or unselect and call the GetMarks2OnAfterFetch client action again.

Result:


Hope this helps.

Thanks,

Akhila

UserImage.jpg
Nikhil Chopade

Thank you for sharing the idea,I will try this in my application


Thank you

UserImage.jpg
vikas sharma
Champion

Hi,

This list seems some selection list so we can assume that there are some checkbox are there and when user click on any row we are selecting that particular row. UI representation may be different. So for this you can add one onclick event on the list item. When user click on any item simply update the count. For storing the selected values you can create a local variable of list type. When user clicks on any item just add that item in this list and count will be the size of this list. If you want to decrease the count on click then can write something like it should be 8 - size of list. 

regards

Community GuidelinesBe kind and respectful, give credit to the original source of content, and search for duplicates before posting.