Joget DX 8 Stable Released
The stable release for Joget DX 8 is now available, with a focus on UX and Governance.
Agree on your approach- This will only display staff ID for those who not register their asset yet.
You can also do this. In your "Default Form Options Binder", make use of the extra filter conditions.
customProperties.asset = 'No'
In the selectbox itself, you can use duplicate value validator so that on submission of the form, it will be rejected.
Thank you so much! Your suggestion really helps.
Hello, experts.
I need ideas because I've stuck on this one.
I have two forms. Form Staff and Form Asset. So the user fill in form staff which means they have to key in staff ID. Then, on form asset. they will register their asset and assign the asset to their staff ID that will be in drop down list. They have to choose their staff ID from that drop down list.
Right now, I'm using Default Form Options Binder to display staff ID which means user can submit multiple times. I tried using JDBC Binder with coding:
SELECT c_name, c_staffId
FROM `jwdb`.`app_fd_staff`
WHERE c_StaffId NOT IN (SELECT c_assignAsset FROM `jwdb`.`app_fd_aset`)
This will only display staff ID for those who not register their asset yet. It seems inefficient to my team.
I also tried:
IF EXISTS (SELECT c_staffId, c_assignAset
FROM app_fd_staff
JOIN app_fd_aset
WHERE c_staffId
IN (SELECT c_assignAsset
FROM app_fd_asset))
Print 'Record exists'
ELSE
Print 'Record does not exist'
But JDBC Binder can only read Select statement.
What I want to do is, the form will display all staff ID and if user already have their asset registered, there will be popup notification "Record already exist" when they select their staff ID. If not, the data will be insert into database.
Can anyone give me ideas, please.
Thank you, in advance.