20
Views
11
Comments
Solved
rangeslider is not working

i want to calculate the number of hours of employee ,for that i use rangeslider so i will get the hours in 0 to 8 but its not saving in database , is this the right way to save the hours or im doing wrong.

HR Portal.oml
UserImage.jpg
Garima Sharma
Solution

Hi Muhammad, 

i have attached the oml for your reference with some changes .. Please look into this if it fulfills your requirement.

modified HR Portal.oml
2023-09-28 14-21-55
Daryna Kravets

Hi Muhammad, 

You overwrite your selected values instead of using them here:

Change the assignments and then it should work.

2023-09-17 09-46-02
Muhammad Haseeb

not working still

2023-09-28 14-21-55
Daryna Kravets

Have you checked (using debugger) if the values are assigned to correct variables?

Also, could you share your updated OML?

2023-09-17 09-46-02
Muhammad Haseeb
2023-09-28 14-21-55
Daryna Kravets

Let's return to your first OML... 

In RangeSliderIntervalOnValueChange you have two input parameters - IntervalStart and IntervalEnd. Those are the values selected from the widget. You need to use them, by assigning their values directly to other variables (Attendencetracking's attributes in your case) or calculating something from them (for instance, difference between the selected interval ends). In the first OML you did the opposite, assigned pre-existing data from Attendencetracking to the parameters.

2023-09-17 09-46-02
Muhammad Haseeb

i just have a workhours entity attribute in attendecetracking ,i want 1 number like 0 to 8 and save it in workhours ,is that possible ori have to make other entities attribute of start and end range

2023-09-28 14-21-55
Daryna Kravets

If you need only one number, what's the reason of choosing RangeSliderInterval? RangeSlider widget would be perfect for your requirement. 

Configure it like here:

And set a new action for OnValueChange. Add this assignment there:

You can delete RangeSliderId if you don't plan to reuse this action for other sliders. 

2023-09-17 09-46-02
Muhammad Haseeb

still no hours save in database .should i have to assign a user id ?updated oml is here

HR Portal.oml
2023-09-28 14-21-55
Daryna Kravets

You're still trying to use RangeSliderInterval instead of RangeSlider. Please implement the solution I described. Ideally, delete the current widget and action and implement everything exactly as on the screenshots. 

2023-09-17 09-46-02
Muhammad Haseeb
UserImage.jpg
Garima Sharma
Solution

Hi Muhammad, 

i have attached the oml for your reference with some changes .. Please look into this if it fulfills your requirement.

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