6 Replies Latest reply on May 11, 2009 3:22 PM by thingmaker

    Replace contents

    thingmaker

      Title

      Replace contents

      Post

      I am using FM9. Currently there is no way to directly replace radio buttons/checkboxes without converting to a field first, then 'replace field contents'. An awkward workaround.

       

      Is there a better way to do this in FM10? Thanks. 

        • 1. Re: Replace contents
          philmodjunk
            

          You don't need to do the extra steps.

           

          Pull up the found set of the records you want to update.

          Click on the radio button of one of the records to give it the value you want.

          Choose Replace Field contents, specifying "current contents" and all your records will be updated to match.

          • 2. Re: Replace contents
            thingmaker
              

            Sorry, I don't see this. Regardless of what field I select after the results from the find are displayed, when I select "replace field contents" I have a choice of "Replace with: (then the name of first field in the valuelist)" 

             

            Are you talking about FM10 or am I doing something wrong? Thanks. -dr

             

            • 3. Re: Replace contents
              philmodjunk
                

              thingmaker wrote:

              Sorry, I don't see this. Regardless of what field I select after the results from the find are displayed, when I select "replace field contents" I have a choice of "Replace with: (then the name of first field in the valuelist)" 

               


              First we have a difference in terminology. A field is what you've formatted with your radio button value list. When you click that radio button you are selecting a value to store in that field. I'm using FMP 10 (and this tool has worked much the same since FMP 3).

               

              I have a field with two radio buttons; "Flu" and "Cold". If I click "Cold" and choose Replace Field Contents, I see Replace with: "Cold". If I click "Flu" and choose Replace Field Contents, I see Replace with: "Flu".

               

               

               


              • 4. Re: Replace contents
                thingmaker
                  

                Thanks Phil. I created a new file and your example worked as you said. Unfortunately, there must be something wrong with my original file.

                 

                I have a file that has 50 different fields, each a radio button with the value list of "yes" when checked. I decided to change this to one field called 'Categories' with 50 checkboxes, each named correctly.

                 

                To change the prev. radio buttons to the new checkboxes, I search by selecting one of the radio buttons whose field is called 'libraries'. 

                 

                Then I go the field "Categories" and select the corresponding 'libraries' checkbox and then replace field contents...  

                 

                It should say "Replace with libraries?" but 'says "Replace with yes"? 

                 

                It's random sometimes it works but mostly it is wrong. I can't get it to focus on the field with the checkmarks instead of the original search results.

                 

                Anybody else have this problem?  Thanks. -Derryl 

                • 5. Re: Replace contents
                  philmodjunk
                    

                  I believe the difference lies in the difference between radio button formatted fields (which is what I understood you were originally asking about) and check box formatted fields.

                   

                  Check box formatted fields allow you to store multiple values in the same field. Each value will be sepearated by a carriage return. If you were to remove the check box formatting and just look at the unformatted text, you would find that each selected value is listed on a separate line in the order matching the order in which the check boxes were clicked.

                   

                  Thus the check box field on two different records could have "yes" and "libraries" selected, but if you removed the formatting one record might show:

                  Yes

                  Libraries

                   

                  and the other record might show

                  Libraries

                  Yes

                   

                  The replace with current contents is probably only showing the first line of text as I don't think it has any way of displaying multiple lines of text.

                   

                  Try this experiment: Put a copy of your checkbox field next to the original check box field and use Field Control | Setup... to change its format back to "Edit box". Make sure that the field is sized to show multiple lines of text. Now check and uncheck check boxes in your check box formatted copy of the field and watch what happens in the unformatted copy of the field. Click in the unformatted copy of the field while multiple values are selected, choose Replace field contents and see if what you see there matches the first line of the unformatted field.

                   

                  If I'm right, you should be able to use replace field contents with either the check box formatted or unformatted copy of the field to update your record's fields even though it doesn't look that way when you select Replace Field Contents and only see one value. Note that this replace operation will update all the fields in the found set to have all the values selected in the check box field of the current record.

                  • 6. Re: Replace contents
                    thingmaker
                      

                    Brilliant, Phil! Thanks. You put me on the right road to figuring this out. Apparently the field that I used for the categories was also one of the existing radio buttons. I accidently chose that one instead the one I made for the purpose. It has a similar name. Using your method I was able to figure out where the missing info was coming from by clicking on different checkboxes/radio buttons. 'Yes' doesn't show up when the 'classic' radio isn't checked. Thanks again. -dr

                     

                     

                    http://www.4dmaze.com/images/other/philo.png