Alpha Software Mobile Development Tools:   Alpha Anywhere    |   Alpha TransForm subscribe to our YouTube Channel  Follow Us on LinkedIn  Follow Us on Twitter  Follow Us on Facebook

Announcement

Collapse

The Alpha Software Forum Participation Guidelines

The Alpha Software Forum is a free forum created for Alpha Software Developer Community to ask for help, exchange ideas, and share solutions. Alpha Software strives to create an environment where all members of the community can feel safe to participate. In order to ensure the Alpha Software Forum is a place where all feel welcome, forum participants are expected to behave as follows:
  • Be professional in your conduct
  • Be kind to others
  • Be constructive when giving feedback
  • Be open to new ideas and suggestions
  • Stay on topic


Be sure all comments and threads you post are respectful. Posts that contain any of the following content will be considered a violation of your agreement as a member of the Alpha Software Forum Community and will be moderated:
  • Spam.
  • Vulgar language.
  • Quotes from private conversations without permission, including pricing and other sales related discussions.
  • Personal attacks, insults, or subtle put-downs.
  • Harassment, bullying, threatening, mocking, shaming, or deriding anyone.
  • Sexist, racist, homophobic, transphobic, ableist, or otherwise discriminatory jokes and language.
  • Sexually explicit or violent material, links, or language.
  • Pirated, hacked, or copyright-infringing material.
  • Encouraging of others to engage in the above behaviors.


If a thread or post is found to contain any of the content outlined above, a moderator may choose to take one of the following actions:
  • Remove the Post or Thread - the content is removed from the forum.
  • Place the User in Moderation - all posts and new threads must be approved by a moderator before they are posted.
  • Temporarily Ban the User - user is banned from forum for a period of time.
  • Permanently Ban the User - user is permanently banned from the forum.


Moderators may also rename posts and threads if they are too generic or do not property reflect the content.

Moderators may move threads if they have been posted in the incorrect forum.

Threads/Posts questioning specific moderator decisions or actions (such as "why was a user banned?") are not allowed and will be removed.

The owners of Alpha Software Corporation (Forum Owner) reserve the right to remove, edit, move, or close any thread for any reason; or ban any forum member without notice, reason, or explanation.

Community members are encouraged to click the "Report Post" icon in the lower left of a given post if they feel the post is in violation of the rules. This will alert the Moderators to take a look.

Alpha Software Corporation may amend the guidelines from time to time and may also vary the procedures it sets out where appropriate in a particular case. Your agreement to comply with the guidelines will be deemed agreement to any changes to it.



Bonus TIPS for Successful Posting

Try a Search First
It is highly recommended that a Search be done on your topic before posting, as many questions have been answered in prior posts. As with any search engine, the shorter the search term, the more "hits" will be returned, but the more specific the search term is, the greater the relevance of those "hits". Searching for "table" might well return every message on the board while "tablesum" would greatly restrict the number of messages returned.

When you do post
First, make sure you are posting your question in the correct forum. For example, if you post an issue regarding Desktop applications on the Mobile & Browser Applications board , not only will your question not be seen by the appropriate audience, it may also be removed or relocated.

The more detail you provide about your problem or question, the more likely someone is to understand your request and be able to help. A sample database with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with your application. Screen shots of error messages are especially helpful.

When explaining how to reproduce your problem, please be as detailed as possible. Describe every step, click-by-click and keypress-by-keypress. Otherwise when others try to duplicate your problem, they may do something slightly different and end up with different results.

A note about attachments
You may only attach one file to each message. Attachment file size is limited to 2MB. If you need to include several files, you may do so by zipping them into a single archive.

If you forgot to attach your files to your post, please do NOT create a new thread. Instead, reply to your original message and attach the file there.

When attaching screen shots, it is best to attach an image file (.BMP, .JPG, .GIF, .PNG, etc.) or a zip file of several images, as opposed to a Word document containing the screen shots. Because Word documents are prone to viruses, many message board users will not open your Word file, therefore limiting their ability to help you.

Similarly, if you are uploading a zipped archive, you should simply create a .ZIP file and not a self-extracting .EXE as many users will not run your EXE file.
See more
See less

split a field

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    split a field

    Hello Everyone,

    I Have a field, that needs to be split. I do not know what function the genie uses to split, fields. Have looked in the reference manuals, but do not see what I am looking for.

    Have one field with a ship name, and voyage number combined. Would like to strip the voyage number to another field.

    "Tamesis V- 3874"

    Need to get "Tamesis" the vessel name back in the same vessel field. Get rid of "V-". Get the Voyage number "3874" into the voy field.

    I see in the genie how to split with the - . But If possible, during the operation would like to get rid of both the V and -. Or have the V transfered to the Voy field, and Just leave the Vessel name in the origional field. Tried to see what function name is used for an operation like this, but could not find the correct one.

    Thanks Ed

    #2
    RE: split a field

    Ed

    You can use the word() function

    word("Tamesis V- 3874",1) = "Tamesis"

    word("Tamesis V- 3874",-1) = "3874"

    Jerry

    Comment


      #3
      RE: split a field

      Ed,

      1. Go to the Operations tab;
      2. New Operation;
      3. Update Records;
      4. Choose the table which contain the records to be updated; Press the Create Using Genie button;
      5. Select Break a Field Into Its Parts, next to the bottom;
      6. Follow the yellow brick road.
      TYVM :) kenn

      Knowing what you can achieve will not become reality until you imagine and explore.

      Comment


        #4
        RE: split a field

        Hi Ken & Jerry,

        I was going to use the genie, but could not figure out how to get rid of the V from the field.

        If I use Jerry's suggestion, does the vessel and voyage need to be in each field before the operation is performed?
        So that it leaves the vessel in name in the origional field, and then the voy number in the second field??

        Thanks Ed

        Comment


          #5
          RE: split a field

          My guess is, Yes, it will. Make a backup and give it a try. Worst ya gotta do is delete the T&E version and rename the backup.

          kenn
          TYVM :) kenn

          Knowing what you can achieve will not become reality until you imagine and explore.

          Comment


            #6
            RE: split a field

            Ed

            If you are using an update operation, the first field can be replaced with an expression of itself and the other field can use the other expression. For instance, if the field with the current info is called "vessel" and the new field to fill is "voyage", the expression for the "vessel" field is

            word(vessel,1)

            and the expression for the voyage field is

            word(vessel,-1)

            Jerry

            Comment


              #7
              RE: split a field

              Hi Jerry,

              My main problem, as I see it, is that my voy field is only 10 char long. My Vessel Field is 30 char long. So I could not copy the contents of vessel into voy, and use WORD.

              What I tried to do, was use the genie, and split my origional vessel field at the "-". And put the voyage number where it was supposed to go. And use WORD to get rid of the V left in the origional field(after I looked up WORD in the ref manual).

              What I found was, the split function in the genie does not work.

              I wonder if the split function in operations has a problem with the new build. I have not used it(split) for a couple of months, and a few builds ago. When I split the field, the split after - just disappears, and does not go into the field that it was selected to go into. Tried it 5 times(with sample data), to make sure I did not fall asleep during the operation. It does not work. Rebooted the computer, and of course restarted A5. Still no go.

              So do not know where to go from here??

              Ed

              Comment


                #8
                RE: split a field

                Ed

                I think my explanation was not explicit enough. Attached is a screenshot of how an update operation if filled out and uses the expressions. The fact that the voyage is only 10 characters is not a problem because the update just puts the result of the expression in the field. You can update both fields at the same time in one update operation. The genie is helpful, but some operations are easier to do with a simple update. I used the genie, but just went to the general tab and selected Assign a calculated value to a field.

                Jerry

                Comment


                  #9
                  RE: split a field

                  Well I lied a little(or did not give you enough information like I should have). So I do not drive you nice people nuts.

                  The vessel name can have up to 3 parts like:

                  "SAGA BEIJA FLOR V-45TY", so that complicated it a little.

                  After looking in the manuals, and looking up word, I see that it needs to be exact. Will have to pick up in the morning.

                  Thanks Ed

                  Comment


                    #10
                    RE: split a field

                    Hi Ed.

                    Are all fields with the Vessel and Voyage exactly the same format ie. "SAGA BEIJA FLOR V-45TY" Vessel name followed by V-????. If so then you use the AT() function on the "-" that way you acheive just what you want and lose the V. Have a look on the board here I did show someone else how to it.

                    Keith Hubert
                    London.
                    Regards
                    Keith Hubert
                    Alpha Guild Member
                    London.
                    KHDB Management Systems
                    Skype = keith.hubert


                    For your day-to-day Needs, you Need an Alpha Database!

                    Comment


                      #11
                      RE: split a field

                      Ed,

                      Check out thread Msg 20083.

                      Keith Hubert
                      London.
                      Regards
                      Keith Hubert
                      Alpha Guild Member
                      London.
                      KHDB Management Systems
                      Skype = keith.hubert


                      For your day-to-day Needs, you Need an Alpha Database!

                      Comment


                        #12
                        RE: split a field

                        Ed

                        Don't worry about driving us nuts. Many of us are experts on goofy behavour. Keith is correct, if you always have the "V-" for vessel, you can use the at() function in combination with the substr() function to get the text string before the V

                        substr(vessel,1,at("V-",vessel)-1)

                        You may want to use alltrim to remove leading and trailing spaces. This will give the text string after the "V-".

                        substr(vessel,at("V-",vessel)+2)

                        Jerry

                        Comment


                          #13
                          RE: split a field

                          Just waiking up at work on the West Coast

                          So yes, the vessel name is first, and then a "V-" was(is) between the vessel name and voyage number.

                          As soon as I get caught up, I will let you know my success.

                          Thanks for the attentiion, and help.......... Ed

                          Comment


                            #14
                            RE: split a field

                            How pickey, can I get???

                            Used..... substr(vessel,1,at("V-",vessel)-1)........worked perfect, for the vessel name.


                            Ended up using....substr(vessel,at("V-",vessel)+1).....it split the voyage number with the - in front of it. How pickey can I get to get rid of the - in front of the voyage number?? Or can the - be stripped from the voyage field with another function?? I've tried to play with what you have given me, but can't seem to get the - to disappear, on this side of the -.

                            Thanks Ed

                            Comment


                              #15
                              RE: split a field

                              Ed:
                              make it +2 to drop the "-"

                              I hope this helps

                              bob adler

                              Comment

                              Working...
                              X