BrianTam
4 years agoQrew Member
Help with URL Button to Trigger Checkbox & Dynamic Rules
Hi,
I'm trying to make a fancy "to-do" list (simplified for sake of discussion) and have hit a snag.
I had set up some Dynamic Rules to have a Checkbox log a Date/Time field to the current timestamp.
This works only in "Edit" mode of a form.
I wanted this to be easier on the user and tried using a URL Button that when clicked (in View mode) would check the Checkbox field for them. However, when this happens, it doesn't look like it's triggering the Dynamic Form rule of also logging the timestamp.
------------------------------
Brian
------------------------------
I'm trying to make a fancy "to-do" list (simplified for sake of discussion) and have hit a snag.
I had set up some Dynamic Rules to have a Checkbox log a Date/Time field to the current timestamp.
This works only in "Edit" mode of a form.
I wanted this to be easier on the user and tried using a URL Button that when clicked (in View mode) would check the Checkbox field for them. However, when this happens, it doesn't look like it's triggering the Dynamic Form rule of also logging the timestamp.
var text AffectedCheckbox = "&_fid_195";
var text URL= URLRoot() & "db/" & Dbid() & "?act=API_EditRecord"
& "&rid=" & URLEncode ([Record ID#])
& $AffectedCheckbox & "=1"
& "&apptoken=" & "(my app token)";
"javascript:" &
"$.get('" &
$URL &
"',function(){" &
"location.reload(true);" &
"});"
& "void(0);"
Also, I read that javascript reload isn't good as QB will remove it for security reasons later on in the year, but I wasn't able to find an alternative that worked in these discussions.
Thank you for any help.
------------------------------
Brian
------------------------------