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



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

ui_get_File NOT type

  • Filter
  • Time
  • Show
Clear All
new posts

    ui_get_File NOT type

    Is it possible to use ui_get_file() to filter out file types? I do NOT want to include .dbf files. I could just filter by PDF|TXT|DOC, - but I'm afraid I'd leave a file type out.

    Thanks ~ Tom

    Hi Tom,

    I think I'm on the right track for what you want.
    The code below is designed to have the end user choose a spreadsheet.
    With just a few simple modifications, it should work the way you want.

    Hope this helps.

    FUNCTION getaFile AS C ( )
    DIM SHARED response as c
    DIM SHARED varC_result as C
    texttospeech("Choose a file.")
    ok_button_label = "&OK"
    cancel_button_label = "&Cancel"
    varC_result = ui_dlg_box("Choose a file.",<<%dlg%
    What file?:| [%p=ui_get_file("","Text(*.txt)|SpreadSheet(*.xls)|FudgeSheet(*.xlsx)|BingySheet(*.slk)",response,"X");I=$a5_smart_file%.40response];
    <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
    case varC_result = "OK" .and. len(alltrim(remspecial(response)))>0
    case varC_result = "OK" .and. len(alltrim(remspecial(response)))=0
    getaFile = "No File Selected"
    case else
    getaFile = "Aborted"
    end select
    Gregg is a great site to test and share sql code


      Hi Gregg,

      I'll give this a try in the morning.

      I don't see how it EXCLUDES a file type (dbf files). I think you're saying, just don't include that file type in the list. I can do that.

      ~ Tom


        If you look at the options for file types, there are literally thousands, each specific to a type of application, or across applications.
        Without trying to be clever, I think you really need to manage the list on an inclusive not exclusive basis.
        Just sayin'
        See our Hybrid Option here;

        Apologies to anyone I haven't managed to upset yet.
        You are held in a queue and I will get to you soon.


          Good advice Ted.

          I think I'll use file.exist(*.dbf) and if it does, move it to another folder.

          Thanks to all for taking a look and sharing your thoughts.

          ~ Tom


            I wouldn't use ui_get_files(). I would make a list of unwanted extensions, collect the files in your desired folder and present only those for review in a dialog for actions (example in attached file).
            Attached Files
            Mike W
            "I rebel in at least small things to express to the world that I have not completely surrendered"


              Mike - I get an error message when trying to open your attachment: "Invalid File Specified"

              ~ Tom


                I'll try and upload again. It is just a txt file. I didn't work. This new message board isn't very good, in fact it sucks. I can't upload a txt file. And the code I am giving you was all perfectly formatted but the Code delineators in this new message board doesn't incorporate the formatting. Very annoying!! . Here is the text in the file I tried to upload anyway.

                dim vfldr as C="E:\URSA"+chr(92) ' <<<< change this to your folder address
                dim vLexclude as C=comma_to_crlf(".alb,.alm,.alx,.dbf,.ddd,.cdx,.abd,.ddm,.ddx,.fpt,.sem,.set,.sex")
                dim vprobe as C=vfldr+"*.*"
                dim vname_now as C=""
                dim vext_now as C
                dim vLext_name_a as C
                dim vLname_ext_a as C
                dim vLext_name_d as C
                dim vLname_ext_d as C
                dim vLfiles_show as C
                dim vn_sort_code as N=1
                dim vn_chr46 as N
                for each foo in vfiles
                if is_one_of(vext_now,vLexclude)=.f.
                end if
                'SHOW DIALOG
                'DIALOG STRUCTURE
                dim dlg_title as C
                dlg_title = "FILES"
                dim dlg_body as C
                dim dlg_code as C
                dim vR as C
                'dialog field variables
                'build dialog
                dlg_body = <<%dlg%
                {region1}{background=#210,190,210}{frame=1,1}{sp=63}<%T=File Open;B=T;I=$$,1!file_open>{sp=3}<%T=Sort;B=T;I=$$sort%4,1!sort>
                {region2}{font=arial,8,bi}{frame=1,1: Frame2 }{font=Arial,10}{background=#243,233,119}
                {sp=3}{font=courier new,10,b}[.90,31vfile_pick^#vLfiles_show!evfk_*]{text=3};
                IF a_dlg_button="init"
                END IF
                'FILE PICK
                IF left(a_dlg_button,5)="evfk_"
                if a_dlg_button="evfk_change"
                if vn_sort_code=1 .or. vn_sort_code=2
                end if
                end if
                END IF
                'FILE OPEN
                IF a_dlg_button="file_open"
                END IF
                IF a_dlg_button= "sort"
                dim vpstyle as C=comma_to_crlf("menu.v_item_min_leftx=0,color.menu_v_background=#250+240+152,color.menu_v_left=#200+85+85,color.menu_v_right=white,,10,b,color.font=menu_v_font")
                dim vpur as C
                dim vLway as C=comma_to_crlf("File Type Ascending,File Type Descending,Filename Ascending,Filename Descending")
                if vpur="File Type Ascending"
                else if vpur="File Type Descending"
                else if vpur="Filename Ascending"
                else if vpur="Filename Descending"
                end if
                END IF
                IF a_dlg_button="DELETE"
                if vfile_pick=""
                msgbox("A FILE SELECTION IS REQUIRED")
                GOTO ENDDELETE
                end if
                vconf=ui_msg_box("CONFIRM","Delete "+vname_now+vext_now+" now?",33)
                if vconf=1
                if file.exists(vfldr+vname_now+vext_now)
                if vn_sort_code=1
                else if vn_sort_code=2
                else if vn_sort_code=3
                else if vn_sort_code=4
                end if
                msgbox("The file "+vname_now+vext_now+" does not exists")
                end if
                end if
                END IF
                if a_dlg_button="exit"
                end if
                'GENERATE DIALOG
                if vR="Cancel"
                end if
                Last edited by Mike Wilson; 04-27-2020, 11:07 PM.
                Mike W
                "I rebel in at least small things to express to the world that I have not completely surrendered"


                  WOW!!! This represents a lot of work and genius thinking.

                  Thank you - I'll have to "go to school" on it to fully understand, but I'm sure it will be very helpful.

                  Thanks again,

                  ~ Tom