1 Reply Latest reply on Dec 13, 2013 5:24 AM by beverly

    How to mark check box after records are imported

    aanshi

      I m importing records using from csv file.. e.g in csv file there is field 'Value' its contains string like this"A,B,C,D"

      I want to divide this string SO that i can get A B C D indiviaualy ..then i wan to mark or check checkbox accordind to value .

      E.g after import records ..in Value field contains,"A,B.D" and there is a checkbox also as shown in screen shot Now what I want...

      If in Value field its contain only A,B,D then I have to mark or check that chaeckbox .How to perform this ?....

        • 1. Re: How to mark check box after records are imported
          beverly

          Keep in mind that "checkboxes" are really a RETURN-DELIMITED list of values in a field. The 'formatting' of the field (on the layout) is what makes the checkbox style and if the value is in the field, the check is checked.

           

          Try it: create a value list (in the dialog) and put the field on the layout twice. Format the first one based on the value list as checkbox. Now check/uncheck the values in the first copy of the field. Notice the values in the second copy of the same field.  Regardless of the order in the 'checkbox-formatted' field, the values in the plain formatted field are in the order in which you check/uncheck! Since we usually don't care the storage order, this is acceptable.

           

          On to your problem: you are importing the values and they are coming in as COMMA-DELIMITED. Simply exchange the values from comma to return with the Substitute() function:

           

               Substitute( myfield ; "," ; "¶" ) // note: the last symbol is the pilcrow (return character)

           

          Et voila! Your field is now return delimited and if displayed on the layout with the checkbox format, the appropriate values will be checked.

           

          You can do this with another field to auto-enter, or script it (loop through the found set) to change the imported field. If you wish to keep the comma-separated list, don't replace the imported field, but create another to auto-enter.

           

          Beverly