Forum Discussion

AnvikaReddy's avatar
AnvikaReddy
Qrew Trainee
7 years ago

Is It Possible to write while or for loop in formula field?

Is It Possible to write while or for loop in formula field?

 If possible ple explain with example.

Thanks
  • No, at least not with native Quick Base. It is more like Excel in that regard where there are formulas in fields

    However, if you know JavaScript, then you can write code pages which can have programs.
  • You can't write a loop in the formula language. While you can write all sorts of loops and recursive procedures in JavaScript I have to ask what are you trying to accomplish?
  • >Is it Possible to call JavaScript With out using  IOL technique?

    All other techniques are largely just going to be variants of the IOL technique. Why not just use the accepted method which is adequately documented and for which there are 100s of public solutions available in the Pastie Database? I somehow sense that you are reluctant to try the IOL technique - just take the plunge and you will be pleased with the result.
  • How do I loop to lookup the next record that exists with one lower number of the record I am currently on.

    I have a key field call ID but sometimes it can skip a number since the table is being imported from a SQL server. 

    I want to lookup the last call ID before the current one and it should subtract 1 until it finds a record with that Call ID.
    • QuickBase96's avatar
      QuickBase96
      Qrew Trainee

      Going back to this thread. Is there a way to loop or for each in a formula column?

      I'm looking to add in a Rich Text formula column, hyperlinks for each value in a multi select column or for each record in the child table.  



      ------------------------------
      QuickBase 96
      ------------------------------

      • MarkShnier__You's avatar
        MarkShnier__You
        Icon for Qrew Legend rankQrew Legend

        No problem

        just make your perfect hyperlink on the child table as a rich formula field, and then roll it up to the parent as a combined tech summary field.

        then on the parent, make a formula Rich Text field which will convert the Combined Text summary to text and replace the semi colon delimiters with a <br> character to give a nice vertical list  

        not tested but try

        SearchAndReplace(

        ToText([My combined text hyperlinks]),
        " ; ", "<br>")

         



        ------------------------------
        Mark Shnier (Your Quickbase Coach)
        mark.shnier@gmail.com
        ------------------------------