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

quick help with a calculation

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

    #46
    Re: quick help with a calculation

    Originally posted by hov333 View Post
    ignore1= S (user entered so it can be anything)
    ignore2= QX (also user entered)

    input (scan_serial) -> S1234XQ = 1234
    S1234=1234
    1234=1234
    1234QX=1234

    12SQX34=12SQX34
    OK.. we are getting close..
    The first 3 examples make sense..the last one doesn't..doesn't conform with the others.
    Shouldn't it be:
    12SQX34=1234

    Comment


      #47
      Re: quick help with a calculation

      hey gabe, yes we're getting close. I put the last one there to show that it should not change since the beginning and end of the input do not have the ignore "key characters". Yes it does contain the same characters but the ignore is supposed to ignore only the begging and end of the string.

      The only way the last example would change is:
      if say we used this instead for ignore1: 12S

      Then the output would be QX34

      Here's another: say if Ignore1 =2S the result should still say 12SQ34 d because that first digit (1) is missing, so only strings beginning with 2S would be affected.

      Does it make any sense?
      Last edited by hov333; 08-23-2011, 04:03 PM.

      Comment


        #48
        Re: quick help with a calculation

        This should do you:
        Code:
        FUNCTION ignore AS C (Text AS C, ignore_left AS C, ignore_right AS C )
        	text=alltrim(text)
        	xL=len(ignore_left)
        	XR=len(ignore_Right)
        	M1=if(left(text,XL)=ignore_left,xL+1,1)
        	M2=if(right(text,XR)=ignore_Right,len(text)-M1-XR+1,100)
        	ignore=substr(alltrim(text),M1,M2)	
        END FUNCTION
        Code:
        dim ignore1 as c="S"
        dim ignore2 as c="QX"
        dim scan_serial as c="12SQX34"
        ?ignore(scan_serial,ignore1,ignore2)
        = "12SQX34"
        
        ignore="S"
        ignore2="XQ"
        scan_serial="S1234XQ "
        ?ignore(scan_serial,ignore1,ignore2)
        = "1234"
        
        scan_serial="S1234"
        ?ignore(scan_serial,ignore1,ignore2)
        = "1234"
        Last edited by G Gabriel; 08-23-2011, 04:51 PM.

        Comment


          #49
          Re: quick help with a calculation

          So explained conditionally
          if any of the characters in ignore1 are found in the same number of positions at the beginning of scanned, they will be removed and
          if any of the characters in ignore2 are found in the same number of positions at the end of scanned, they too will be removed

          This matches all of your examples including the very last.

          Is this watertight?
          what if coincidentally one of the exclude characters is intended as part of the scan ?

          Sorry Gabe I didnt see your entry - at first look seems the same as
          Last edited by Ray in Capetown; 08-23-2011, 04:52 PM. Reason: late entry

          Comment


            #50
            Re: quick help with a calculation

            hey guys goodmorning. Ray, Yes you're right. The last example is to show that if the characters are in the string but NOT in the begging or end as noted, the string will not be affected.
            The point is that Ignore1 & 2 are usually left blank (meaning nothing to be removed from the scan, will be entered AS IS) but sometimes we scan parts that have 1 or 2 (or more) leading characters that I don't want to be scanning. I'd like to ignore those letters by stating what they are via Ignore1 (for leading) or Ignore 2 (for trailing). Does this make sense? It would be very easy to rather control the input than do it in A5 but the scanners are not very sophisticated.

            Gabe I'll give your post a shot as well and let you know how I make out.

            Thanks!

            Comment


              #51
              Re: quick help with a calculation

              Did you try my sample?
              There can be only one.

              Comment


                #52
                Re: quick help with a calculation

                Hey stan,

                Just gave it a shot. Yes it looks like thats the one!

                if(left(Var->scan_serial,len(var->ignore1))=var->ignore1,"",left(Var->scan_serial,len(var->ignore1)))+substr(Var->scan_serial,len(var->ignore1)+1,len(Var->scan_serial)-(len(var->ignore1)+len(var->ignore2)))+if(right(Var->scan_serial,len(var->ignore2))=var->ignore2,"",right(Var->scan_serial,len(var->ignore2)))

                holy moly! all that just for this feature huh, I would have never gotten this without your help.

                Thanks for all the help everyone I really appreciate you sticking with me on this one!

                Comment

                Working...
                X