Forum Discussion

PushpakumarGna1's avatar
PushpakumarGna1
Qrew Assistant Captain
6 years ago

do we have for loop in native quickbase

Hi 

Is it possible to write for loop in formula text column?

Thanks
Pushpakumar

------------------------------
Pushpakumar Gnanadurai
------------------------------
  • Hi Pushpakumar,

    What do you mean by putting a loop in a formula text field? What are you trying to accomplish and what kind of calculation are you trying to do?

    ------------------------------
    Evan Martinez
    Community Marketing Manager
    Quick Base
    ------------------------------
    • PushpakumarGna1's avatar
      PushpakumarGna1
      Qrew Assistant Captain
      Hi Evan,

      Basically , i have a string and i need to write to four variables

      For example , String="N|LT|01|2021,02,25 ; N|NLT|01|2021,02,25 ; Y|LT|01|2021,02,25 ; Y|LT|02|2022,02,25 ; Y|LT|03|2023,02,25 ; Y|NLT|04|2019,02,23 ;"

      N_LT = "N|LT|01|2021,02,25 ;"
      N_NLT="N|NLT|01|2021,02,25 ;"
      Y_LT="Y|LT|01|2021,02,25 ; Y|LT|02|2022,02,25 ; Y|LT|03|2023,02,25 ;"
      Y_NLT="Y|NLT|04|2019,02,23 ;"

      Basically i am looking for "for" loop which will traverse the string one by one based on delimiter and check the first and second parameter and put that in the respective string.

      can you please provide me some suggestions.

      Thanks


      ------------------------------
      Pushpakumar Gnanadurai
      ------------------------------
      • DonLarson's avatar
        DonLarson
        Qrew Elite
        Pushpakumar,

        I am assuming you have a field of data that you want to become four new fields.   If the user or some other source populates the first field, then individual formulas in four other fields can each evaluate the first field.

        If your source is 
        [Source]="1,2,3,4"

        Each individual field is defined: 
        [Field One]= Left([Source],1)  Which would return "1"
        [Field Two]= Left([Source],"'")  Which would return "2"
        [Field Three]= Left([Field Two],"'")  Which would return "3"
        [Field Four]= Right([Source],1)  Which would return "4"


        The way you are parse, trim and cut up your source depends on the source format.   There is no way to natively write a single loop that will populate the four new fields.

        ------------------------------
        Don Larson
        Paasporter
        Westlake OH
        ------------------------------