Quick Base Discussions

Expand all | Collapse all

Deactivate Url Link in Email Notification After It has been sent

QuickBaseCoach Dev./Training06-01-2017 21:13

Quinten Quinten06-01-2017 22:54

QuickBaseCoach Dev./Training06-01-2017 23:25

  • 1.  Deactivate Url Link in Email Notification After It has been sent

    Posted 05-31-2017 21:38

    An email notification is sent with a url link formula that allows a field to be changed in a table. However, sometimes the field in the table gets changed manually with a different text than what the email url is allowing. Ex. Email wants the field to change to "blue", but the manual adjustment change it to "red". When the link in the email gets clicked days after, the field in the table that was manually changed gets overwritten to a different text. Ex. The field that had "red" changes back to "blue". How do you keep the email from overwriting when you don't want it to? Is there a way to deactivate the email or the links in the email after is has been sent?



  • 2.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 05-31-2017 21:45
    Its hard to understand exactly what you are asking, but if you have an formula URL Button button that you want to suppress under some conditions, just make it calculate to blank under those conditions.


  • 3.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 05-31-2017 21:53

    The Url button in the email will always update the field in the table no matter what. But I don't want it to if the field has already been changed to something else. How do I go about that?



  • 4.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 05-31-2017 23:07
    Is there a way to know if the field have "been changed to something else


  • 5.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 06-01-2017 16:15

    There is no way of telling the email that the multiple choice field has been changed, because it was manually changed. A solution would be to put a if then statement in the link in the email so when/if the field gets changed in the table, no affect will occur.



  • 6.  RE: Deactivate Url Link in Email Notification After It has been sent

    Bronze
    Contributor
    Posted 06-01-2017 16:30
    Exactly! And what would the code for something like that look like?


  • 7.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 06-01-2017 16:44
    So are you saying that you need to record the date / time the field was manually changed, and the date time that the email button changed it, and if the manual change date/time was after the last email change date / time, then suppress the button?


  • 8.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 06-01-2017 18:03
    No date or time. The field I'm looking at is a multiple choice field with three options, "entered data", "approved", "shipped". Email gets sent out when field is "entered data" and when the link in the email is pressed, field moves to approved. Sometimes there is not enough time to wait for the email response so it gets moved to shipped. However, a person goes back in their email and presses the link forcing the field to go back to approved. I don't want that. Once it is manually changed to shipped it needs to stay there even if the link is pressed in the email.


  • 9.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 06-01-2017 18:09
    Do you still need to fire the email when the button is pressed?  I assume so.  Anyways I now understand your request.  Can you post your current formula for the button?


  • 10.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 06-01-2017 19:52

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

    & "&apptoken=b9pzvpjdbfk42zck9xawjk99nx5"

    & "&usertoken=b27z4b_xfm_b57dsvw279ijqcf93f6cdaj7y4f"

    & "&_fid_206=Approved";


    var text Display = URLRoot() & "db/" & Dbid() & "?act=dr&rid=" & [Record ID#];

    $Extend
    & "&rdr=" & URLEncode($Display)



  • 11.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 06-01-2017 19:57
    .. and one more question.  Is the email triggered only when the field is changed to Approved?


  • 12.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 06-01-2017 20:20

    Email is triggered when field is changed to "enter data". The button in the email then triggers the field to be changed to "approved".



  • 13.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 06-01-2017 20:40
    So can we just hide the button when the status is not "entered data"

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

    & "&apptoken=b9pzvpjdbfk42zck9xawjk99nx5"

    & "&usertoken=b27z4b_xfm_b57dsvw279ijqcf93f6cdaj7y4f"

    & "&_fid_206=Approved";


    var text Display = URLRoot() & "db/" & Dbid() & "?act=dr&rid=" & [Record ID#];

    If([my status field]="entered data",

    $Extend

    & "&rdr=" & URLEncode($Display))


  • 14.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 06-01-2017 21:06

    That doesn't work. It is almost impossible to hide a button in an email. That button in the email will always be active.



  • 15.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 06-01-2017 21:13
    Have you tested it?


  • 16.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 06-01-2017 21:25
    Yes. The field changes back to "approved" after modifying it to "shipped".


  • 17.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 06-01-2017 21:28
    Did you make the change I suggested and tested it on a record that was in status Shipped.


  • 18.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 06-01-2017 21:35
    Yup. I just said that in my last comment. The email sent out when "entered data". Before I clicked the button in the email, I changed the field to "shipped". When I clicked the button in the email, the field went back to "approved". Not what I want


  • 19.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 06-01-2017 21:38
    Ah, yes, because the situation changed after the email was sent.  Now I see the problem.

    OK so how about this.

    Change the Role permissions  for edit those users who are clicking the button to not be able to edit if the status = Shipped.  Is that practical?

    If it is, then there is probably a way to make the button fail gracefully and not spew out a permissions error on the screen.


  • 20.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 06-01-2017 22:00

    I wouldn't know if that is possible because I don't know how to edit the role permissions...



  • 21.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 06-01-2017 22:45
    What i meant was, from a business point of view are you OK to lock a set of users out from editing once the status = Shipped.


  • 22.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 06-01-2017 22:54
    Yes, I suppose if that is a solution


  • 23.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 06-01-2017 23:25
    That is the only solution i can think of.


  • 24.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 06-02-2017 01:15

    How do I go about doing that? Do I give the viewer or participant the permission since the url button is in an email?



  • 25.  RE: Deactivate Url Link in Email Notification After It has been sent

    Posted 06-02-2017 01:29
    You will need to make a new Role for these users, similar to Participant, so you can copy that Role, but them have a Custom Permission Rule for that table that it cannot be edited if the status is shipped.

    User will need to be signed on to push the button.  Regular users will find that they will auto log in if they checked the box when signing in to Keep me signed in on this computer.