Discussions

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?

    Silver
    Contributor
    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?

    Silver
    Contributor
    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?

    Top
    Contributor
    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?

    Top
    Contributor
    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?

    Bronze
    Contributor
    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.