Discussions

Expand all | Collapse all

Button colors

  • 1.  Button colors

    Posted 28 days ago
    Hello,
    I have found QuickBase Clip Art Icons and have used this:
    "<img src=\"https://images.quickbase.com/si/16/221-point_red.png\" title=\"PAST

    But, I need to have at least 25 different colored buttons to use as identifiers on reports.  How would I create more buttons? 
    Please note: I have no programming skills!

    Thank you
    Lynne H

    ------------------------------
    BuildPro
    ------------------------------


  • 2.  RE: Button colors

    Posted 28 days ago
    Hi Lynne,
    I was in your shoes about a month ago. A great resource that requires very minimal programming skills is Kirk Tratchy's magic button app within QuickBase. If you search for magic button you should be able to find it fairly easily, then from there his app has more buttons and button functions than most people will ever need. You can look at each button and copy past the code it makes buttons very easy. And even better he has a YouTube channel that help walk you through some of them.

    I hope that helped,
    Hank

    ------------------------------
    Hank Halverson
    ------------------------------



  • 3.  RE: Button colors

    Posted 25 days ago
    Hi Lynne,

    If you are looking for a library of icons you can use and an example of how you set up the formula you might find this article Colorful Icons make Quickbase more Productive a helpful resource. It links away to an accessible library of images you can call out to in Quickbase and gives an example of the set up since you aren't looking to have the images link away to anywhere you are just trying to display images correct?

    You can do that with a formula rich text field and a formula like this as an example:

    Case ([Status],"Not Started","<img src=\"https://images.quickbase.com/si/16/227-rect_red.png\">>",
    "<img src=\"https://images.quickbase.com/si/16/229-rect_yellow.png\">>",
    "<img src=\"https://images.quickbase.com/si/16/228-rect_green.png\">>",
    null) 


    ------------------------------
    Evan Martinez
    ------------------------------



  • 4.  RE: Button colors

    Posted 28 days ago
    Thank you.  I have the Magic Button App.  that is where I have accessed the buttons I am currently using.  However, I need more colors for the buttons and do not know how to that.

    ------------------------------
    BuildPro
    ------------------------------



  • 5.  RE: Button colors

    Posted 28 days ago
    I have tried this using the "Rich Text Button Builder" app, but there is something wrong with the formula...

    if([Customer Initials]="SMH",https://buildproconstructionco.quickbase.com/db/brr53r65a?a=dr&r=b&rl=bt5)

    ------------------------------
    BuildPro
    ------------------------------



  • 6.  RE: Button colors

    Posted 28 days ago
    Here is some code I used for a button. You can copy past this into a rich text formula. The first part of the code will allow you edit the size and the color of the button so you can make it literally any color. The second part of it edits the function of the button. In my case it redirects you to a new url. You will have to change the app token, FID, the [DBID_], and the url code. 



    //formatting visuals of button
    var text bgcolor = "#34A853";
    var text txtcolor = "white";
    var text style = "style=\"text-decoration: none; background:" & $bgcolor & "; border-radius: 5px; padding: 8px 20px; color: " & $txtcolor & "; display: inline-block; font: normal 700 24px/1 \"Calibri\", sans-serif; text-align: center; text-shadow: none;";

    //Inner workings of button
    var text url =

    URLRoot() & "db/" & [_DBID_RFP_REQUEST_FORM] & "?act=API_EditRecord&rid=" &[Record ID#]
    & "&apptoken=uwi4fb9cj4szcdzjnfxd5xz3te"
    & "&_fid_148=2"
    & "&rdr=" & URLEncode("https://divisionsinc.quickbase.com/db//brpms6hce?a=dbpage&pageID=19");

    "<a " & $style & " href=\"" & $url & "\">Approve</a>"

    ------------------------------
    Hank Halverson
    ------------------------------



  • 7.  RE: Button colors

    Posted 28 days ago
    Thank you....but, I don't even know where to begin with this.

    ------------------------------
    BuildPro
    ------------------------------



  • 8.  RE: Button colors

    Posted 28 days ago
    Hank, what would I copy/paste here?

    This is where I am trying to create the button
    https://buildproconstructionco.quickbase.com/db/bdsdmyt7i?a=mf&fid=92&windowed=1




    ------------------------------
    BuildPro
    ------------------------------



  • 9.  RE: Button colors

    Posted 28 days ago

    IF(
    [Customer Initials]="SMH",//formatting visuals of button
    var text bgcolor = "#34A853";
    var text txtcolor = "white";
    var text style = "style=\"text-decoration: none; background:" & $bgcolor & "; border-radius: 5px; padding: 8px 20px; color: " & $txtcolor & "; display: inline-block; font: normal 700 24px/1 \"Calibri\", sans-serif; text-align: center; text-shadow: none;";

    ------------------------------
    BuildPro
    ------------------------------



  • 10.  RE: Button colors

    Posted 28 days ago
    You would paste the code into that text box where you have an if statement. You will have to change the app token, FID, the [DBID_], and the url code. You will have to find out how to get those though because it would be a lot to describe over a forum like this. I YouTube is a great resource and so it QuickBase help. If you google each of those you should be able to find yours and switch it out.

    ------------------------------
    Hank Halverson
    ------------------------------



  • 11.  RE: Button colors

    Posted 28 days ago
    The std library of icons s here

    https://login.quickbase.com/db/9kaw8phg?a=ShowPage&pageid=160
    https://login.quickbase.com/db/bcgnn27bx?a=q&qid=1000039

    If you want help with a formula, you will need to copy and paste your code as we cannot edit screen shots



    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------



  • 12.  RE: Button colors

    Posted 28 days ago
    Hi Mark,
    I have accessed the links you sent, however, I need more button colors than are included in those links.  I have tried using the "Rich Text Button Builder":

    I have been able to build the button with the color of my choice, however, I don't know how to make it work in my production app.

    IF(
    [Customer Initials]="SMH",https://buildproconstructionco.quickbase.com/db/brr53r65a?a=dr&r=b&rl=b3g





    ------------------------------
    BuildPro
    ------------------------------



  • 13.  RE: Button colors

    Posted 28 days ago
    @BuildPro
    Is there a reason why you cannot use a formula URL button? Does the button need to have a floating label? If not then you're better off just using a formula URL button because there is no code involved with those.​

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------



  • 14.  RE: Button colors

    Posted 28 days ago
    I can use whatever is easiest as long as I can have 20+ colors for the button.  Please show me what I need to do...step by step.  thank you

    ------------------------------
    BuildPro
    ------------------------------



  • 15.  RE: Button colors

    Posted 28 days ago
    Edited by Mark Shnier (YQC) 28 days ago
    Are you simply trying to create a coloured icon, or are you looking to create a button that does something when it is clicked?

    ------------------------------
    Mark Shnier (YQC)
    mark.shnier@gmail.com
    ------------------------------



  • 16.  RE: Button colors

    Posted 27 days ago
    Just a colored icon...does not need to do anything.

    ------------------------------
    BuildPro
    ------------------------------



  • 17.  RE: Button colors

    Posted 27 days ago
    ...
    IF([CUSTOMER INITIALS]="SMH", round button colored #336600,
    [CUSTOMER INITIALS]="KB",round button colored #ffd11a,

    and so on...

    ------------------------------
    BuildPro
    ------------------------------



  • 18.  RE: Button colors

    Posted 25 days ago
    Edited by Michael Tamoush 25 days ago
    Is the 'button' supposed to have text on it, and if so will the text always be the same, or will it change with each instance?

    There are a couple ways to go about this. What you are trying and many suggestions are essentially using images that already exist somewhere online (so using the code to 'reference' this image). In this case, you are limited to the images that already exist online (unless you make your own).

    A second option is to use a formula rich text field. If there is no text or the same text in each instance, you can do something like this:

    Formula Rich Text Field:

    //Below will set all background color

    var text BackgroundColor =
    Case([Customer Initials],
      "SMH", "#336600",
      "KB", "#ffd11a",
       .....
      "Last Entry", "#123456");

    //Below is the "button". Radius can be adjusted to make it more of a circle or more of a square, color is text color, padding is only used if there is text - it's how much space above and below and left and right of text - you don't need padding if you set the width and height, border is how thick the border is plus the color, and then of course the font size on applicable if there is text on the 'button'.

    "<a style=\"background: $BackgroundColor; border-radius: 1000px; color: #ffffff; display: inline-block; padding: 2px 0px; width:100px; height:20px; text-align: center; border: 1px solid #030404; font-size: 12px \">Text here if needed or leave blank</a>"

    ------------------------------
    Michael Tamoush
    ------------------------------