7 Replies Latest reply: Aug 22, 2012 10:15 AM by Nicole Smith RSS

    subfield

    ahnet ceylan

      Hello,

      I have oen column in my table it is about title

      it includes name ,department and title so I want to take only title part

      for example

      John Deep(Information Tecnology Department) - Chief Information Officer) I want to take bold part (title)

        • Re: subfield
          Nicole Smith

          Do all fields like this have a hyphen in them?  If so,

           

          =subfield(subfield(Field, '-', 2), ')', 1)

           

          The inner subfield will take everything after the hyphen.  The outer subfield will take away the closing parenthesis at the end of it.

            • Re: subfield
              ahnet ceylan

              Hi Nicole ,

               

              İf name includes more than one hyphens What should it be?

              For example

              John Deep((Information Tecnology Department/Urp-Ist) - Chief Information Officer)

               

              Urp-Ist is Location name abbreviation.

                • Re: subfield
                  Nicole Smith

                  =subfield(subfield(Field, '-', 3), ')', 1)

                    • Re: subfield
                      ahnet ceylan

                      For this example AHMET MENNAN MUFTUOGLU (Paz.& Sat.Bsk.(Yurtici) (Yurtici Ticaret Md./Psyi-Ist) - Uzman)

                      your code's result is : Ist

                        • Re: subfield
                          Nicole Smith

                          It shouldn't be giving you Ist if you use 3 instead of 2 because it is saying take the 3rd section after stripping out the hyphens.  But if it's giving you Ist, then try it with a 4 instead of a 3

                           

                          i.e.

                           

                          =subfield(subfield(Field, '-', 4), ')', 1)

                            • Re: subfield
                              ahnet ceylan

                              It is the same and also

                              MURAT IRDESEL (Pazarlama ve Satis Bsk.(2.Bolge) (Taskent Md./Ps2) - Sef(Ticaret)(Yd))  for this sample,It only gives Sef(Ticaret   this result with '2' in code

                               

                              When I make it '3' It gives no result

                               


                                • Re: subfield
                                  Nicole Smith

                                  For AHMET MENNAN MUFTUOGLU (Paz.& Sat.Bsk.(Yurtici) (Yurtici Ticaret Md./Psyi-Ist) - Uzman)

                                   

                                  =subfield(subfield(Field, '-', 3), ')', 1)     (will return Uzman)

                                   

                                   

                                  For MURAT IRDESEL (Pazarlama ve Satis Bsk.(2.Bolge) (Taskent Md./Ps2) - Sef(Ticaret)(Yd))

                                   

                                  =left(subfield(Field, '-', 2), len(subfield(Field, '-', 2)) - 1)     (will return Sef(Ticaret)(Yd))

                                   

                                   

                                  See attached.

                                   

                                   

                                  Is there anything that is consistent between all of your fields?  It isn't good to have to write different expressions for each field.