Hi Ravi,
This existing widget seems to fit your requirement: https://appstore.home.mendix.com/link/app/105748/
It has community support though, meaning that in future versions it may break: something that already seems to be the case going by the comments. It may be an easy fix though