Hello i have an input field where i wanna do a check if number is higher then 8 or not. I looked online and people said i could do it with JS, but i don't know how to pass values into JS.
this is my action + JS
and this is my input field: \
so simplified: if an user puts 10 into the input field, i need to get an error message back. If a user puts 4, it saves it into the DB
Hi, @Kemal Ozdogan.
I don't think you need JS to do this. You can just compare if GetWorkedDayById.List.Current.WorkedDays.WorkedHour > 8 using If.
Edit: As your column WorkedHour is a text, it will be necessary to convert to integer using TextToInteger() function, resulting TextToInteger(GetWorkedDayById.List.Current.WorkedDays.WorkedHour) > 8
Hope this helps.
Everything is getting saved into the DB still, even if workedHour is bigger then 8
I needed to do TextToInt on the workedhour aggregate and not on the 8 :D
Use TextToInteger function in WorkedHour attribute, doing that you will compare both values as numbers.
TextToInteger(GetWorkedDayById.List.Current.WorkedDays.WorkedHour) < 8
haha yeahh did that, thank you for the help :D