Alpha Video Training
Results 1 to 17 of 17

Thread: ui_get_text() help

  1. #1
    "Certified" Alphaholic
    Real Name
    Thomas Patten
    Join Date
    Apr 2000
    Location
    Duluth, MN
    Posts
    1,494

    Default ui_get_text() help

    I cannot get ui_get_text to work. Links below were not helpful.

    Code:
    result = ui_get_text("Email","Enter email address: ","")
    
    IF result = "" .or. result = "ui_Cancel_Selected" then
      END
    End if
    Thanks for taking a look.

    ~ Tom

  2. #2
    Member
    Real Name
    Andrew Davidowicz
    Join Date
    Aug 2018
    Location
    New Jersey
    Posts
    23

    Default Re: ui_get_text() help

    Hey Tom,

    What exactly isn't working with it?

    side note: shouldn't it just be result = UI_Cancel_Selected, without the quotes? Also I don't think UI_*_Selected works with ui_get_text.

  3. #3
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,625

    Default Re: ui_get_text() help

    Works in older levels of Alpha.

    Got any more info?
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  4. #4
    Member
    Real Name
    Andrew Davidowicz
    Join Date
    Aug 2018
    Location
    New Jersey
    Posts
    23

    Default Re: ui_get_text() help

    Thanks Al, nice to know that. Only been working with Alpha for a little over a year now.

  5. #5
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,625

    Default Re: ui_get_text() help

    Quote Originally Posted by Davidowicza View Post
    Hey Tom,

    What exactly isn't working with it?

    side note: shouldn't it just be result = UI_Cancel_Selected, without the quotes? Also I don't think UI_*_Selected works with ui_get_text.
    Correct.

    The result of the function is Character and UI_Cancel_Selected is Numeric.

    You can test UI_Cancel_Selected=2

    something like this...

    Code:
    result = ui_get_text("Email","Enter email address: ","")
    
    msgbox("1",result)
    'debug(1)
    if ui_Cancel_Selected = 2 then
        msgbox("User Canceled")
    end if
    
    IF result = "" then
      END
    End if
    
    
    msgbox("2",result)
    Of course, testing for a valid email result isn't being done....

    (Example for the purpose of showing the options, not for actual use in an app)
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  6. #6
    "Certified" Alphaholic
    Real Name
    Thomas Patten
    Join Date
    Apr 2000
    Location
    Duluth, MN
    Posts
    1,494

    Default Re: ui_get_text() help

    Al - you're my hero - at least for today ;-)

    Thanks ~ Tom

  7. #7
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,625

    Default Re: ui_get_text() help

    Quote Originally Posted by Tom Patten View Post
    Al - you're my hero - at least for today ;-)

    Thanks ~ Tom
    One day at a time works for me...

    So you are good for now?
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  8. #8
    Member
    Real Name
    Andrew Davidowicz
    Join Date
    Aug 2018
    Location
    New Jersey
    Posts
    23

    Default Re: ui_get_text() help

    Quote Originally Posted by Al Buchholz View Post
    Correct.

    The result of the function is Character and UI_Cancel_Selected is Numeric.

    You can test UI_Cancel_Selected=2

    something like this...
    Al,

    UI_CANCEL_SELECTED is always returning as 2 even when I click "ok", thus making this method not work with ui_get_text(). (Version 12.3 Build 2999)

  9. #9
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,625

    Default Re: ui_get_text() help

    Quote Originally Posted by Davidowicza View Post
    Al,

    UI_CANCEL_SELECTED is always returning as 2 even when I click "ok", thus making this method not work with ui_get_text(). (Version 12.3 Build 2999)
    Yup, I did that too quickly. UI_CANCEL_SELECTED is a constant that can be compared to a numeric result if the result if numeric.

    It's why you want to build your own xdialogs if you want more control than the pre-built ones.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  10. #10
    "Certified" Alphaholic
    Real Name
    Thomas Patten
    Join Date
    Apr 2000
    Location
    Duluth, MN
    Posts
    1,494

    Default Re: ui_get_text() help

    Hi Al,

    I spoke too soon as I see others have commented. Everything comes up "cancel".

    So I guess I'll have a try at xdialog. Seems the ui_get_text() should work.

    Thanks for trying.

    ~ Tom

  11. #11
    Volunteer Moderator
    Real Name
    Alan Buchholz
    Join Date
    Oct 2000
    Location
    Delavan, Wisconsin
    Posts
    9,625

    Default Re: ui_get_text() help

    Quote Originally Posted by Tom Patten View Post
    Hi Al,

    I spoke too soon as I see others have commented. Everything comes up "cancel".

    So I guess I'll have a try at xdialog. Seems the ui_get_text() should work.

    Thanks for trying.

    ~ Tom
    That's the only way (or at least the best) I know of to validate the email address within the xdialog.
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.

  12. #12
    "Certified" Alphaholic
    Real Name
    Thomas Patten
    Join Date
    Apr 2000
    Location
    Duluth, MN
    Posts
    1,494

    Default Re: ui_get_text() help

    I got the xdialog text box working. No problem. That was a much better solution.

    I haven't looked at validating an email with it though. Guess that's next.

    ~ Tom

  13. #13
    "Certified" Alphaholic Tom Henkel's Avatar
    Real Name
    Tom Henkel
    Join Date
    May 2002
    Location
    New Jersey, USA
    Posts
    1,875

    Default Re: ui_get_text() help

    check out

    A5_IS_EMAIL_VALID()

    This function, at least, checks for an appropriate format.

    Tom

  14. #14
    "Certified" Alphaholic
    Real Name
    Thomas Patten
    Join Date
    Apr 2000
    Location
    Duluth, MN
    Posts
    1,494

    Default Re: ui_get_text() help

    Thanks Tom ~ Tom

  15. #15
    VAR
    Real Name
    Martin W. Cole
    Join Date
    Apr 2000
    Location
    Terrell, Texas (near Dallas)
    Posts
    5,956

    Default Re: ui_get_text() help

    Pretty sure ui cancelled returns result=""
    technically, unless you want to tell the user "User Cancelled," all you need to check for is if result > ""
    Cole Custom Programming - Terrell, Texas
    972 524 8714
    martin_w_cole@msn.com

    ____________________
    "A young man who is not liberal has no heart, but an old man who is not conservative has no mind." GB Shaw

  16. #16
    "Certified" Alphaholic
    Real Name
    Thomas Patten
    Join Date
    Apr 2000
    Location
    Duluth, MN
    Posts
    1,494

    Default Re: ui_get_text() help

    Hi Martin - your suggestion was the first thing I tried; without success. I'm not sure why UI_get_Text() is so difficult and different; but it is. xDialog worked well for me.

  17. #17
    "Certified" Alphaholic Mike Wilson's Avatar
    Real Name
    mike wilson
    Join Date
    Apr 2005
    Location
    Grand Rapids, Michigan
    Posts
    4,200

    Default Re: ui_get_text() help

    Hi Tom,
    xDialogs are always a solution. I have few forms in my applications and work almost all activities through xdialogs. Just to have it said, ui_get_text is written in xdialog. As far as validating an email as a deliverable email, you might want to follow this thread - https://forum.alphasoftware.com/show...e-within-Alpha
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

Similar Threads

  1. ui_get_text()
    By Citadel in forum Alpha Five Version 10 - Desktop Applications
    Replies: 7
    Last Post: 11-13-2009, 02:20 AM
  2. toolbox and ui_get_text()
    By CALocklin in forum Alpha Five Version 6
    Replies: 6
    Last Post: 10-05-2004, 03:50 PM
  3. sys_open used with ui_get_text
    By Jean-P. B├ędard in forum Alpha Five Version 4
    Replies: 10
    Last Post: 01-30-2002, 09:58 AM
  4. ui_get_text box and cancel?
    By Jeff Moses in forum Alpha Five Version 4
    Replies: 2
    Last Post: 05-24-2000, 08:20 PM
  5. ui_get_text in a report?
    By Sandy Garrett in forum Alpha Five Version 4
    Replies: 8
    Last Post: 05-12-2000, 09:05 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •