Forum Discussion

olivermah's avatar
olivermah
Qrew Assistant Captain
7 years ago

button to update a field only when another field value = X

I'm trying to create a button where the user can push it to change a value in the field to one that is specified by the user.  however only when another field is equal to a certain value. the below code works just fine, however i now need to make it more specific where value in another field (multiple choice field) Field X = a certain value.

trying to understand the URL for dummies but I just can't wrap my head around how to be more specific with the code below:

var text URL = URLRoot() & "db/" & Dbid() & "?act=API_EditRecord&rid=" & [Record ID#]

& "&_fid_352=" & URLEncode("true")
& "&_fid_317=" & URLEncode ([Rate - Cost - GRI Total])
& "&_fid_163=" & URLEncode ([Rate - Cost - GRI Total]);


"javascript:" &
"$.get('" & 
$URL & 
"',function(){" &
"location.reload(true);" &
"});" 
& "void(0);"