131
Views
17
Comments
Solved
how to change the visibility of a button after the list is empty

I have a more button under each list which will show the list one by one after clicking, how to disappear it after there is no more value to show in the list 

2024-12-10 04-40-04
Gitansh Anand
Solution

Hi r N, I looked at the web page. Try this to hide the visibility of the button when there are no more values to show.
In the visibility property of the button that shows hotel requests, set this value:

GetHotelRequests.List.Length <> GetHotelRequests.Count

Do the same for the remaining buttons on their lists.

Thanks
Gitansh Anand

2020-10-15 12-25-43
Prashant Jha

Hi ,

You can add style class. On that you can use if condition and add CSS value as

 display : none;

Something like this 

style = If(IsMoreClicked, "display: none;", "")


Thanks,


2026-02-26 06-29-24
Rahul
 
MVP

Hi,
you can check list length or add phases if no more phases to show then hide the button visibility according to condition or taking Boolean variable. or you keep it in If widget.



2023-04-16 15-25-31
Krishnanand Pathak

Hi rN,

You can use the Visible property of button as example shown below or You can also do this by CSS style as prashant suggested.



Regards
Krishnanand Pathak

UserImage.jpg
Rituparna Nayak

hey there I have binded the list with an integer variable not a boolean ,so it will not work the above way

2023-04-16 15-25-31
Krishnanand Pathak

I am talking about the below "Empty" property which is provided by Outsytems for every list.

UserImage.jpg
Rituparna Nayak
2023-04-16 15-25-31
Krishnanand Pathak

Change the below highlighted source from your list then try the below condition on Visible property of the More button:


GetUsers.List.CurrentRowNumber < GetUsers.List.Length-1

Let me know If it works for you.

UserImage.jpg
Rituparna Nayak

its showing just two lists and then the button is invisible where as there are more list to be shown

2023-04-16 15-25-31
Krishnanand Pathak

Please try to replicate the issue & share oml if possible so that I can check.

UserImage.jpg
Rituparna Nayak

 I have binded a local variable of integer type(default value = 1) to the aggregate which adds by 1 when the more button is clicked ,now the thing is when there is no more list to be shown the button should not ne visible anymore.

2023-04-16 15-25-31
Krishnanand Pathak

Set the below condition to button Visible property also change the source highlighted:
MaxRecords <= GetUsers.List.Length

Oml is also attached for reference.

Hope this will solve the issue.

MoreButton.oml
2024-12-10 04-40-04
Gitansh Anand

Hi r N, Please share your OML so that we can have a better understanding.

UserImage.jpg
Rituparna Nayak

The oml is too large to be upoaded here

2024-12-10 04-40-04
Gitansh Anand

Can you give a test user name, password, and link in the message for the page in the screenshot so that we can look at the issue?

UserImage.jpg
Rituparna Nayak

User name: Finance 

Password : abcd 

https://edulab01.outsystemsenterprise.com/Travel_DIL/TravelRequestDetail?SubmitRequestId=65

after you click the show botton in option you will see the detail screen

2024-12-10 04-40-04
Gitansh Anand
Solution

Hi r N, I looked at the web page. Try this to hide the visibility of the button when there are no more values to show.
In the visibility property of the button that shows hotel requests, set this value:

GetHotelRequests.List.Length <> GetHotelRequests.Count

Do the same for the remaining buttons on their lists.

Thanks
Gitansh Anand

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