Discussions

 View Only
Expand all | Collapse all

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

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

    Posted 05-16-2018 06:15
    Is It Possible to write while or for loop in formula field?

     If possible ple explain with example.

    Thanks


  • 2.  RE: Is It Possible to write while or for loop in formula field?

    Posted 05-16-2018 09:29
    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.


  • 3.  RE: Is It Possible to write while or for loop in formula field?

    Posted 05-21-2018 08:37
    Thanks , 
    I know JavaScript,How to call this code pages? 


  • 4.  RE: Is It Possible to write while or for loop in formula field?

    Posted 05-22-2018 11:49
    You can use IOL technique to implement this on the form.

    Thanks,
    Gaurav


  • 5.  RE: Is It Possible to write while or for loop in formula field?

    Posted 05-22-2018 14:10
    A link or further clarification would be helpful. Googling your answer leads to a certain type of eye surgery.


  • 6.  RE: Is It Possible to write while or for loop in formula field?



  • 7.  RE: Is It Possible to write while or for loop in formula field?

    Posted 05-24-2018 15:12
    Thank you Scott!


  • 8.  RE: Is It Possible to write while or for loop in formula field?

    Posted 05-25-2018 05:08
    Thanks guys,

    Is it Possible to call JavaScript With out using  IOL technique?


  • 9.  RE: Is It Possible to write while or for loop in formula field?

    Posted 05-25-2018 08:01
    Hi Anvika,

    Try this.
    "<img qbu=\"module\" src=\"/i/clear2x2.gif\" " & "onload=\"javascript:if(typeof QBU=='undefined'){QBU={};$.getScript('" & URLRoot() & "db/" & Dbid() & "?a=dbpage&pagename=test.js&rand='+Math.random())}\">" 
    Create a test.js page and put an alert to test out_ if this working or not.

    Thanks,
    Gaurav


  • 10.  RE: Is It Possible to write while or for loop in formula field?

    Posted 05-22-2018 15:54
    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?


  • 11.  RE: Is It Possible to write while or for loop in formula field?

    Posted 05-26-2018 16:34
    >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.


  • 12.  RE: Is It Possible to write while or for loop in formula field?

    Posted 06-19-2018 21:04
    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.


  • 13.  RE: Is It Possible to write while or for loop in formula field?

    Posted 11-29-2023 14:25
    Edited by Zalmen Freund 11-29-2023 14:27

    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
    ------------------------------



  • 14.  RE: Is It Possible to write while or for loop in formula field?

    Posted 11-29-2023 19:03

    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
    ------------------------------