1 2 Previous Next 20 Replies Latest reply on Apr 12, 2016 6:51 PM by user19752

    any Calculation / functions that will Increment Inside 'Replace Field Contents' calculation Results

    listen2earth

      Script Step: Replace Field Contents

       

      if ( field A="myValue"; $$StoredNumber and incremented it ; "else nothing" )

       

      Is there any Calculation / functions that will Increment Inside 'Replace Field Contents' calculation Results??

       

      could Loop but want to Fly.

       

      Thanks4Reflecting

        • 3. Re: any Calculation / functions that will Increment Inside 'Replace Field Contents' calculation Results
          erolst

          Let (

            $$storedNumber = $$storedNumber + ( SomeTable::someField = "someValue" ) ;

            theActualFieldModifyingCalculation

          )

          • 4. Re: any Calculation / functions that will Increment Inside 'Replace Field Contents' calculation Results
            listen2earth

            how can _i_ return record number to increment ?

            when using if statements which not returns consecutive numbers!!

             

            so you see more, need to increment on only those records my if statements return.

            and want to increment the total found count of my search criteri.

             

            thats where my if statements come in.

             

            If _i_ was Looping _i_ wouldn't want to Loop 2 million records so of course perform a find first for those records of interest.

             

             

             

            _i_ have this architectural concept which is  trying to engineer how to forget having to perform FINDS and NOT having to LOOP!!

             

            _i_ tried serialIncrement (text ; incrementBy)   Replacing text with a field but guess you cannot do that!??

             

            HOPE YA FOLLOW AND THIS IS NOT A BURN OUT

             

            THANKS

            • 5. Re: any Calculation / functions that will Increment Inside 'Replace Field Contents' calculation Results
              erolst

              listen2earth wrote:

              _i_ have this architectural concept which is  trying to engineer how to forget having to perform FINDS and NOT having to LOOP!!

               

              What are you smoking? Have some left? Can I give you my address? 

               

              btw, you already received an answer.

              • 6. Re: any Calculation / functions that will Increment Inside 'Replace Field Contents' calculation Results
                listen2earth

                well someone said use get record number!!!

                was pointing out how that's not going to work!! How can THAT work!!

                 

                 

                AND NO!!

                not consume any synthetic sustances!!

                actually just need to eat! Food!! Instead of this screen and data!

                 

                and yes.. The Let statement may work??

                testing!! But first good Food!!

                • 7. Re: any Calculation / functions that will Increment Inside 'Replace Field Contents' calculation Results
                  erolst

                  listen2earth wrote:

                  AND NO!!

                  not consume any synthetic sustances!!

                   

                  Mary Jane ain't synthetic, she's a wholesome country gal …

                   

                  listen2earth wrote:

                  and yes.. The Let statement may work??

                   

                  Yes, it does; but if you only want RFC for the side-effect, this may not be the best way to do it.

                  • 8. Re: any Calculation / functions that will Increment Inside 'Replace Field Contents' calculation Results
                    Mike_Mitchell

                    Actually, it can work perfectly well, if you find the necessary records first.

                     

                    Why would you want to process on records that don't need it? That's unnecessary, creates extra overhead, and possibly messes with other stuff (like modification timestamps).

                    • 9. Re: any Calculation / functions that will Increment Inside 'Replace Field Contents' calculation Results
                      listen2earth

                      EROLST

                      nothing can replace Alive Organic Nutritious Foods to keep you High and expand consciousnes infinitely

                       

                      BUT ANYWAY WHATS RFC, EROLST?  Forgot!

                       

                      ____________________________

                      Mike Mitchell said:

                      Actually, it can work perfectly well, if you find the necessary records first.

                      INSERT BUT _i_ NOT WANT TO "FIND" RECORDS FIRST! NOR LOOP!!

                       

                      Why would you want to process on records that don't need it? That's unnecessary, creates extra overhead, and possibly messes with other stuff (like modification timestamps).

                      ____________________________

                      OK HERES THE SCOOP

                       

                      Higher is having, "developments and results", with what _i_ call "minimal basic instructions".

                       

                      with that said _i_ not like to have a whole bunch of various Relationships /Graphs which _i_ feel can create havoc and fragmentations and prone files down the road to crashes!!

                       

                      _i_ use only one field [ mySearchValue ] that replaces numerous relationships. This field gets set "Anything Searched" for displaying in my Home Portal.

                       

                      _i_ also use only one field for sorting [ PortalSort# ] that gets renumbered by Replace Field Contents. Thus _i_ can sort in any infinite ways and also always direct how it is to be displayed in my portal having my portal set to sort by PortalSort#.

                       

                       

                      So in my Home Portal there's options to view any data and sort in any way from any data source files which are maintained securely tucked away never opened but always remain CLOSED never to crash.

                       

                      MY HomeScreen Portal calls all the closed files scripts. And one of them most frequently used is the renumbering of my PortalSort# field.  Wanting REPLACE FIELD CONTENTS to replace in field  called PortalSort# an increment consecutive number reversing it from The sum total number of records (for any search value).

                       

                      SUMMARIZED

                      There might be 1 million records but only 500 of them will have my search value. So want to begin numbering by starting with 500 and incrementBy -1 which is used to label each portal sort row. ONLY IF MY mySearchValue FIELD = someValue.

                       

                      note my program is in FM12 Advance and used on Filemaker Go also.

                       

                      THANKS FOR YOUR REFLECTIONS

                       

                      Jesus Mourning Sun

                      alias Rob Lewis

                      Listen2Earth

                       

                      business

                      STRUCTURES FROM SILENCE

                      ::|||||()||||||::|||||()||||||::|||||()|||||::|||||()|||||::

                       

                       

                       

                       

                       

                       

                       

                       

                      • 10. Re: any Calculation / functions that will Increment Inside 'Replace Field Contents' calculation Results
                        Mike_Mitchell

                        listen2earth wrote:

                         

                         

                         

                         

                         

                        SUMMARIZED

                        There might be 1 million records but only 500 of them will have my search value. So want to begin numbering by starting with 500 and incrementBy -1 which is used to label each portal sort row. ONLY IF MY mySearchValue FIELD = someValue.

                         

                         

                         

                        Enter Find Mode [ ]

                        Set Field [ mySearchValueField ; Value: someValue ]

                        Perform Find [ ]

                        Replace Field Contents [ mySortField ; Serial numbers ]

                         

                        What you're describing is a very common process, and easily accomplished using the above code.

                         

                        BUT _i_ NOT WANT TO "FIND" RECORDS FIRST! NOR LOOP!!

                         

                         

                         

                        Yeah, we got that. What you didn't explain is why you don't want to use a perfectly good FileMaker function to do what it was designed to do.

                         

                        P.S. It's not necessary to shout.

                        • 11. Re: any Calculation / functions that will Increment Inside 'Replace Field Contents' calculation Results
                          listen2earth

                          wasn't shoutin!! Never shout!  i  into Structures From Silence!

                          you must have YOUR MUSIC LOUD!!!

                          Sorry!! Sometimes just like uppercase!!

                           

                          Is not Replace Field Content a higher and more perfect Filemaker function than having to FIND all the time just to Replace a Field?

                           

                          nevertheless Mile i haven't suceeded yet to  get that let formula to work.

                          might have to resort to FINDS but i feel there is a way to simply increment a number using Replace Field Contents under its calculation option.

                           

                          bottom line what's faster for Filemaker with 1 million records?

                           

                          -FIND and then go over all the records to FIND REPLACE FIELD only for certain records and to set an increment number?

                          -OR JUST USE FIND REPLACE FIELD?

                          • 12. Re: any Calculation / functions that will Increment Inside 'Replace Field Contents' calculation Results
                            Mike_Mitchell

                            listen2earth wrote:

                             

                             

                            bottom line what's faster for Filemaker with 1 million records?

                             

                            -FIND and then go over all the records to FIND REPLACE FIELD only for certain records and to set an increment number?

                            -OR JUST USE FIND REPLACE FIELD?

                             

                            Find what you need, then Replace. I don't know why you would need a second Find.

                             

                            If you want to process 500 records, then the time it takes to do a Replace on 1,000,000 records would be absolutely ridiculous. A loop would be way worse, of course, but the fastest performance is to operate only on the records you need. Indexed Find requests in FileMaker are quite fast.

                            • 13. Re: any Calculation / functions that will Increment Inside 'Replace Field Contents' calculation Results
                              listen2earth

                              agree but not have to process 1 million records when using Replace Field Content without using a Find first.

                              creating a value list to show where they are located assist this.

                               

                               

                              in my what _i_ call 'Finale Loop' --  loops through all records not having to perform a Find and only loops to those records of interest put Into a value List. Showing their location.

                               

                              Loop

                              Go To Record /Request/Page [no dialog: Get (value( fromValueList ; $No) ]

                              End Loop

                               

                              i just though i could get Replace Field Content to work similar to my Finale Loop.

                               

                              totally agree with you that it's simpler to use a Find then use Replace Field Content.

                              But this is not a one time shot.

                               

                              as unique and powerful  Replace Field Contents is, it still has limitation!

                               

                              for being as powerful as it is it should have more parameters within it. just though there was a simple  way to increment from the Replace with calculated result.

                              • 14. Re: any Calculation / functions that will Increment Inside 'Replace Field Contents' calculation Results
                                listen2earth

                                ITS ME AGAIN!!

                                THINKING OUT LOUD!!!

                                 

                                 

                                i start out with a defined calculation field.

                                Has IF statements. for searched criteria across any record fields. This field is on all records. The calculation simply returns the record number.

                                 

                                 

                                can review at a quick glance these record numbers in a global field in a tab the value list.

                                 

                                 

                                So my "Finale Loop" knows ONLY those unique records to go to in the loop processing whatever needs to be processed.

                                 

                                 

                                That's all fine and dandy.

                                Here i am with my found records which are returned to my Portal file and without performing a Find. They are returned through a simple relation a X marked field.

                                 

                                 

                                So  let's say my find is..

                                 

                                 

                                RecNo's.       PortalSort#

                                10555                  1

                                20333                  2

                                25544                  3

                                33554                  4

                                46744                  5

                                53447                  6

                                67889                  7

                                 

                                 

                                They Finale Loop, loops over thousands of records bypassing all those not marked simply by using goto record using the record numbers in the value list.

                                 

                                 

                                Of course in this Loop process yes i can simply increment my field called PortalSort#

                                1 through 7.

                                 

                                 

                                But was hoping Replace Field Contents could do this?

                                 

                                 

                                anyway as i am thinking OUT LOUD here pondering while putting it all out in front of me on paper, now believing i should not employ the Replace Field Contents but some how do it inside this field called PortalSort#. That it should be a calculation field also for somehow returning my increment numbers.

                                 

                                 

                                Just something Esoteric

                                 

                                 

                                Filemaker has evolved so much over Her life span originating from being just a ClarisWorks / AppleWorks Database text processor, that Her evolutionary processes has arrived at multiple ways of extracting Our precious data other than just having to use FIND MODE.

                                1 2 Previous Next