Can any one help me to create a widget for the following criteria

hema sundar
Tera Contributor

step1: Create Label name "Photo Navigation" with toggle switch
step2: If toggle is 'true'
a) then it should display a text "Opted for agreement." with in blue box
b) populate two radio buttons
1)I agree
2) I do not agree
step3: Create blue color button "Saved Preferences"
Step4: If I agree is "true" then I do not agree should be false
Step5: If I do not agree is "true" then I agree should be false
Step6: If toggle is "true" and I agree is "true" and clicked on "Save Preferences" then execute the following criteria:
Criteria1: Search the record in "sys_user_preference" table with field "user" is current logged-in user sys_id and "description" is Photo Navigation.
if the record is found then it should update the record with "value" is true and "description" is Photo Navigation
Criteria2: Search the record in "sys_user_preference" table with field "user" is current logged-in user sys_id and "description" is Photo Navigation.
if the record is not found then it should create the record with "value" is true and "description" is Photo Navigation and "user" is current
logged-in user
Step7: If toggle is "true" and I do not agree is "true" and clicked on "Save Preferences" then execute the following criteria:
Criteria1: Search the record in "sys_user_preference" table with fields "user" is current logged-in user sys_id and "description" is Photo Navigation.
if the record is found then it should update the record with "value" is false and "description" is Photo Navigation
Criteria2: Search the record in "sys_user_preference" table with field "user" is current logged-in user sys_id and "description" is Photo Navigation.
if the record is not found then it should create the record with "value" is false and "description" is Photo Navigation and "user" is current logged-in user
Thank you! If you provide a solution, I will definitely accept it

1 REPLY 1

Naushad564
Kilo Contributor

Ok