Forum Discussion

GunshamLakhiani's avatar
GunshamLakhiani
Qrew Cadet
6 years ago

How to Create a Yes/No Button

Hi Friends,

I am trying to make an app where i want to track some payments to be made if i receive a Physical Bill every month. The Bill Date is constant every month and then there is a Due Date which is also fixed. It is not necessary that i will receive the Bill every month.

So I will add the list of vendors into a vendor master table along with the Billing Day and if Today = Billing Day then a notification should get generated if the Bill is to be generated or not.

The notification will have 2 Button Yes and No. If i receive the physical bill then i click Yes and a record gets generated in the transaction table as below
Vendor (This will come from Vendor Master. Note-Multiple Vendors can have the same Billing Day)
Bill Date (This is calculated as the billing day and the current month and current year)
Amount (This will be generated as 0 as the Amount is not known. This will be entered when the payment is being done.)
Due Date(This is calculated as BillDate + x number of Days)
Status(This will be generated as Unpaid and when the user makes the payment this should gets changed to Paid)


Can anyone help?


Regards
Gunsham

------------------------------
Gunsham Lakhiani
------------------------------
  • The notification will have 2 Button Yes and No. If i receive the physical bill then i click Yes and a record gets generated in the transaction table

    What do you want the No button to do?


    ------------------------------
    Everett Patterson
    ------------------------------
    • GunshamLakhiani's avatar
      GunshamLakhiani
      Qrew Cadet
      The No Button will not do anything which means no records gets generated in the transaction table.

      ------------------------------
      Gunsham Lakhiani
      ------------------------------
      • EverettPatterso's avatar
        EverettPatterso
        Qrew Captain
        So just create one button for Yes and use that in your email notification

        Formula URL (will show as a hyperlink in email) this will use the API to add the record to the transaction table with a status Paid
        URLRoot() & "db/" & "Dbid name" & "?act=API_AddRecord&apptoken=apptoken&_fid_6=Paid"& "&rdr=" & URLEncode(URLRoot() & "db/" & [_DBID_TABLE]​

        1. Change the "Dbid name" to the transaction table dbid you want the record created 
        2. If app tokens are enabled, insert token
        3. Change _fid_6 to the field ID for the transaction Status field
        4. Change rdr [_DBID_TABLE] to the table you want to redirect them back to or any other URL

        If you want to make the hyperlink into a button, then create a Formula Rich Text and use that in the email
        Formula Rich Text
        "<a style=\"background: #4285f4; border-radius: 5px; padding: 8px 20px; color: white; display: inline-block; font: normal 700 24px; text-decoration: none;\" href=\"" & [Yes button] & "\">Yes</a>"​


        1. Change [Yes button] to the new formula URL field


        ------------------------------
        Everett Patterson
        ------------------------------