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

xdialog radio buttons

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

    xdialog radio buttons

    What am I doing wrong?
    I can not get it to go to the if a_dlg_button = "radio1"
    Thanks
    Charlie crimmel

    dim aa as P
    aa = addin.variables()
    DIM SHARED search_by as C
    DIM SHARED varC_result as C
    Dim Shared SSNN as C
    Dim shared Caseno as C
    Dim SHARED FNAME as C
    Dim Shared LName as C
    Dim Shared DOB as D
    Dim SHARED FLNAME as C
    Dim wordct as N
    Dim Level as C
    Dim SHARED FirstNAME as C
    Dim Shared LastName as C
    SSNN = ""
    Caseno = ""
    FNAME = ""
    LName = ""
    search_by=""
    Firstname = ""
    Lastname = ""
    '*****************
    'initialize dob
    'added by hubert
    dob={}
    '*****************
    'tbl = table.current()
    mode = 1
    tbl = table.open("clients")
    ok_button_label = "&OK"
    cancel_button_label = "&Cancel"
    varC_result = ui_modeless_dlg_box("Client Search",<<%dlg%
    {region}Please Select Search Type:{endRegion};
    {region}

    (search_by:First Name!radio1)|
    (search_by:Last Name!radio2)|
    {endRegion};

    {region}
    <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
    {endregion};
    %dlg%,<<%code%

    if a_dlg_button= "OK"
    ui_msg_box("Client Search","Action OK at user request")
    'end
    if a_dlg_button = "radio1" then
    UI_MSG_BOX(Firstname+" - FIND","user Selected Firstname")
    ui_modeless_dlg_ctl_goto("Client Search","FIRSTNAME")
    a_dlg_button=""
    end if
    if a_dlg_button = "radio2" then
    UI_MSG_BOX(Lastname+" - FIND","User Selected Last Name")
    ui_modeless_dlg_ctl_goto("Client Search","LASTNAME")
    a_dlg_button=""
    end if
    end if

    if a_dlg_button= "CANCEL"
    ui_msg_box("Client Search","Action Cancelled at user request")
    ui_modeless_dlg_close("Client Search")
    end
    end if
    %code%)
    end
    FIRSTNAME:
    UI_MSG_BOX(Firstname+" - FIND","This is in the GO for Firstname")
    end

    Lastname:
    UI_MSG_BOX(Lastname+" - FIND","This is in the GO for Lastname")
    end

    #2
    Re: xdialog radio buttons

    Charlie,
    Sorry, but I need a bit more informaton to help. What exactly are you wishing the action to be? Do want the on initiation event to hightlight a certain dialog object?
    Mike W
    __________________________
    "I rebel in at least small things to express to the world that I have not completely surrendered"

    Comment


      #3
      Re: xdialog radio buttons

      First you can take out the reference to the table. it will be moved to the go to routine.
      'tbl = table.current()
      mode = 1
      tbl = table.open("clients")
      Then

      Eventually I will have a progressive lookup.
      This first part just shows a xdialog to select type
      first name and last name.
      I select a radio button and then click ok.
      When I click OK it should close the first x dialog and then open another x dialog by using the goto statement to do a progressive lookup.
      The progressive lookup is not coded in there yet.
      I am just trying to pop up a message box to verify that I am in the correct place.

      I get this message box ok
      ui_msg_box("Client Search","Action OK at user request")
      But I never get
      if a_dlg_button = "radio1" then
      UI_MSG_BOX(Firstname+" - FIND","user Selected Firstname")
      ui_modeless_dlg_ctl_goto("Client Search","FIRSTNAME")
      to execute.

      if a_dlg_button= "OK"
      ui_msg_box("Client Search","Action OK at user request")
      'end
      if a_dlg_button = "radio1" then
      UI_MSG_BOX(Firstname+" - FIND","user Selected Firstname")
      ui_modeless_dlg_ctl_goto("Client Search","FIRSTNAME")
      a_dlg_button=""
      end if
      if a_dlg_button = "radio2" then
      UI_MSG_BOX(Lastname+" - FIND","User Selected Last Name")
      ui_modeless_dlg_ctl_goto("Client Search","LASTNAME")
      a_dlg_button=""
      end if
      end if

      Comment


        #4
        Re: xdialog radio buttons

        Originally posted by crimmelcp View Post
        What am I doing wrong?
        One very "Minor" error.
        Here fixed:
        Code:
        dim aa as P
        aa = addin.variables()
        DIM SHARED search_by as C
        DIM SHARED varC_result as C
        Dim Shared SSNN as C
        Dim shared Caseno as C
        Dim SHARED FNAME as C
        Dim Shared LName as C
        Dim Shared DOB as D
        Dim SHARED FLNAME as C
        Dim wordct as N
        Dim Level as C
        Dim SHARED FirstNAME as C
        Dim Shared LastName as C
        SSNN = ""
        Caseno = ""
        FNAME = ""
        LName = ""
        search_by=""
        Firstname = ""
        Lastname = ""
        '*****************
        'initialize dob
        'added by hubert
        dob={}
        '*****************
        'tbl = table.current()
        'mode = 1
        'tbl = table.open("clients")
        ok_button_label = "&OK"
        cancel_button_label = "&Cancel"
        varC_result = ui_modeless_dlg_box("Client Search",<<%dlg%
        {region}Please Select Search Type:{endRegion};
        {region}
        
        (search_by:First Name!radio1)|
        (search_by:Last Name!radio2)|
        {endRegion};
        
        {region}
        <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
        {endregion};
        %dlg%,<<%code%
        
        if a_dlg_button= "OK"
        ui_msg_box("Client Search","Action OK at user request")
        'end
        end if
        if a_dlg_button = "radio1" then
        	msgbox("Radio1")
        UI_MSG_BOX(Firstname+" - FIND","user Selected Firstname")
        ui_modeless_dlg_ctl_goto("Client Search","FIRSTNAME")
        a_dlg_button=""
        end if
        if a_dlg_button = "radio2" then
        UI_MSG_BOX(Lastname+" - FIND","User Selected Last Name")
        ui_modeless_dlg_ctl_goto("Client Search","LASTNAME")
        a_dlg_button=""
        end if
        
        if a_dlg_button= "CANCEL"
        ui_msg_box("Client Search","Action Cancelled at user request")
        ui_modeless_dlg_close("Client Search")
        end
        end if
        %code%)
        end
        FIRSTNAME:
        UI_MSG_BOX(Firstname+" - FIND","This is in the GO for Firstname")
        end
        
        Lastname:
        UI_MSG_BOX(Lastname+" - FIND","This is in the GO for Lastname")
        end
        You had your if..end if blocks mixed up.

        Comment


          #5
          Re: xdialog radio buttons

          Thanks gabe:
          What I am trying to do is:
          What new in Version 10
          Learning x dialog
          Listview Progressive
          Have a conditional object to prompt for first name or lastname
          and then have the progressive lookup use the selection

          Thanks
          Charlie Crimmel

          Comment


            #6
            Re: xdialog radio buttons

            Originally posted by crimmelcp View Post
            Thanks gabe:
            What I am trying to do is:
            What new in Version 10
            Learning x dialog
            Listview Progressive
            Have a conditional object to prompt for first name or lastname
            and then have the progressive lookup use the selection

            Thanks
            Charlie Crimmel
            OK.. the part of your code, which you posted and which you had trouble with, is now working.

            Comment


              #7
              Re: xdialog radio buttons

              Gabe:
              attached is a text file for my Listview Firstlast
              progressive lookup
              the last name is working but I cannot get the First name to work
              without manually changing the code

              Any help would be appreciated.
              Thanks
              Charlie Crimmel

              Comment


                #8
                Re: xdialog radio buttons

                Hard for me to test without actual table, but Change the code part of the xdlg to:
                Code:
                <<%code%
                
                IF a_dlg_button = "changedname"
                	If vRadio = "firstname" then
                		argname = "NAME =" + argFirstname
                		vFirstname = vname
                '		ui_msg_box("lookup","User Selected: "+vradio)
                		vCustomerID_pTableDef.TableName = "clients"
                		vCustomerID_pTableDef.Filter = "left(firstname, len(:argFirstname)) = :argFirstname"
                		vCustomerID_pTableDef.Order  = "Firstname"
                		a_dlg_button = ""
                	else
                		vLastname = vname
                		argname = "NAME =" + argLastname
                '		ui_msg_box("lookup","User Selected: "+vradio)
                		vCustomerID_pTableDef.TableName = "clients"
                		vCustomerID_pTableDef.Filter  = "left(Lastname, len(:argLastname)) = :argLastname"
                		vCustomerID_pTableDef.Order  = "Lastname"
                		a_dlg_button = ""
                	END IF
                END IF
                
                IF left(a_dlg_button, len("vCustomerID_Sort_")) = "vCustomerID_Sort_"
                	DIM NewSortField AS C
                	NewSortField = substr(a_dlg_button, len("vCustomerID_Sort_")+1)
                	vCustomerID_pLV.Contents = vCustomerID_Funcs.DoSort(vCustomerID_CurrentSortField, vCustomerID_CurrentSortDirection, NewSortField, vCustomerID_pTableDef, vCustomerID_arrContents)
                	a_dlg_button = ""
                END IF
                
                
                IF a_Dlg_button = "vCustomerID_refresh"
                	a_dlg_button = ""
                	vCustomerID_pLV.contents = vCustomerID_Funcs.GetContents(vCustomerID_pTableDef, vCustomerID_arrContents, local_variables())
                END IF
                
                IF a_dlg_button = "OK"
                '	trace.WriteLn("Vradio = " = vradio)
                '	a_dlg_button = ""
                END IF
                %code%)
                And test.

                Comment


                  #9
                  Re: xdialog radio buttons

                  I got it working
                  see attached zip file
                  It uses the client table
                  This zip file has the client table and 1 code item
                  It works with firstname, lastname, city and state

                  Thanks
                  Charlie Crimmel

                  Comment


                    #10
                    Re: xdialog radio buttons

                    Charlie, I think this is similar to what you are doing with your x-dialog, but I took a little different approach. For each of the radio button objects, I display a specific field or set of fields in the dialog. I use the {start_pos} and {condition} in the dialog body to make it look cleaner.

                    If it helps, great, if not, it was fun to show off a little.

                    Code:
                    'Date Created: 04-May-2007 03:32:36 PM
                    'Last Updated: 26-Oct-2010 07:29:41 PM
                    'Created By  :
                    'Updated By  : 
                    retry1:
                    dim aa as P
                    aa = addin.variables()
                    DIM SHARED search_by as C
                    DIM SHARED varC_result as C
                    Dim Shared SSNN as C
                    Dim shared Caseno as C
                    Dim SHARED FNAME as C
                    DIM SHARED Int as C
                    Dim Shared LName as C
                    DIM Shared LNAME2 as C
                    Dim Shared DOB as D
                    Dim SHARED FLNAME as C
                    Dim wordct as N
                    Int = ""
                    SSNN = ""
                    Caseno = ""
                    FNAME = ""
                    LName = ""
                    LNAME2 = ""
                    search_by="Last Name 1st Initial"
                    '*****************
                    'initialize dob
                    'added by hubert
                    dob={}
                    '*****************
                    tbl = table.GET("client")
                    ok_button_label = "&OK"
                    cancel_button_label = "&Cancel"
                    varC_result = ui_dlg_box("Client Search",<<%dlg%
                    {region}Please Select Search Type:{endRegion};
                    {region}
                    (search_by:Case!radio2_)|
                    (search_by:SSN!radio1_);
                    {condition=(tbl.name_get()<>"Link")}
                    (search_by:Last Name!radio4_)|
                    (search_by:Full Name!radio3_)|(search_by:Last, First, DOB!radio7_);
                    (search_by:Last Name 1st Initial!radio5_)|
                    (search_by:Investigations!radio6_);
                    {condition=.T.}
                    {endregion};
                    {condition=(search_by="SSN")}
                    {region=a}
                    {LF}; 
                    Please Enter Client's SSN:| [.20SSNN];
                    {endregion}
                    {condition=(search_by="Case")}
                    {start_pos}
                    {region=a}
                    {LF};
                    Please Enter Client's Case #:| [.15Caseno];
                    {endregion}
                    {condition=(search_by="Last Name")}
                    {start_pos}
                    {region=a}
                    {LF};
                    Please Enter Client's Last Name:|[.25LName];
                    {endregion}
                    {condition=(search_by="Full Name")}
                    {start_pos}
                    {region=a}
                    {LF};
                    Please Enter Client's First Name:|[.20FNAME];
                    Please Enter Client's Last Name:|[.25LName];
                    {endregion}
                    {condition=(search_by="Last Name 1st Initial")}
                    {start_pos}
                    {region=a}
                    {LF};
                    Please Enter Client's First Initial:|[.2INT];
                    Please Enter Client's Last Name:|[.25LName];
                     Other Last Name or Maiden Name:|[.25LNAME2]   - Optional;
                    Please Enter Client's Date of Birth:|[%DATE%.15DOB]   - Optional;
                    {endregion}
                    {condition=(search_by="Last, First, DOB")}
                    {start_pos}
                    {region=a}
                    Please Enter Client's First Name:|[.20FNAME1];
                    Please Enter Client's Last Name:|[.25LName];
                    Please Enter Client's Date of Birth:|[%DATE%.15DOB];
                    {endregion}
                    {condition=(search_by="Investigations")}
                    {start_pos}
                    {region=a}
                    Please Enter Client's Street Address:|[.30ADDR];
                    Please Enter Client's City:|[.25CITY];
                    Please Enter Client's State|[.4STATE];
                    {endregion};
                    {condition=.T.}
                    {line=1,0};
                    {region}
                    <*15=ok_button_label!OK?.not.(search_by="")> <15=cancel_button_label!CANCEL>
                    {endregion};
                    %dlg%,<<%code%
                    if left(a_dlg_button,7) = "radio1_" then
                       ui_dlg_ctl_goto("Client Search","SSNN")
                       a_dlg_button=""
                    end if
                    if left(a_dlg_button,7) = "radio2_" then
                       ui_dlg_ctl_goto("Client Search","Caseno")
                       a_dlg_button=""
                    end if
                    if left(a_dlg_button,7) = "radio3_" then
                       ui_dlg_ctl_goto("Client Search","FNAME")
                       a_dlg_button=""
                    end if
                    if left(a_dlg_button,7) = "radio4_" then
                       ui_dlg_ctl_goto("Client Search","LNAME")
                       a_dlg_button=""
                    end if
                    if left(a_dlg_button,7) = "radio5_" then
                       ui_dlg_ctl_goto("Client Search","INT")
                       a_dlg_button=""
                    end if
                    if left(a_dlg_button,7) = "radio6_" then
                       ui_dlg_ctl_goto("Client Search","ADDR")
                       a_dlg_button=""
                    end if
                    if left(a_dlg_button,7) = "radio7_" then
                       ui_dlg_ctl_goto("Client Search","FNAME1")
                       a_dlg_button=""
                    end if
                    %code%)
                    if varC_result= "CANCEL"
                    	ui_msg_box(Agency+" Client Search","Action Cancelled at user request")
                    	end
                    end if
                    debugcheck()
                    if search_by="Case"
                    	if tbl.name_get() = "Client"
                    		'this is the Client Set, get the ssn from the link table
                    		tbl2 = table.open("link")
                    		tbl2.index_primary_put("case")
                    		rec = tbl2.fetch_find(padr(ut(caseno),12," "))
                    		dim casenod as C
                    		casenod = ""
                    		if rec <1
                    			tbl2.index_primary_put("last6")
                    			rec = tbl2.fetch_find(right(trim(caseno),6))
                    			if rec <1 .or. tbl2.is_deleted()
                    				ui_msg_box(agency+" Client Search","Case Number "+ut(caseno)+" does not exist in Client Information"+chr(13)+"Please check the case # entered and retry")
                    				goto retry1
                    			end if
                    		end if
                    		ssnn = tbl2.ssn
                    		if ut(tbl2.Case)<>ut(caseno)
                    			casenod=tbl2.case
                    		  else
                    		  	casenod = ut(caseno)
                    		end if
                    		tbl2.close()
                    		ui_msg_box(agency+" Client Search","A Client exists for Case Number "+ut(casenod)+chr(13)+"Please verify that this is the Client you are looking for")
                    		goto checksoc
                    	end if	
                    	
                    	indx_2 = tbl.index_primary_put("last6")
                    	'fetch_first(db_current())
                    	rec = tbl.fetch_find(right(trim(caseno),6))
                    	if rec > 0
                    		parentform.resynch()
                    		UI_MSG_BOX(agency+" - FIND","This is the FIRST CASE with this Number "+Upper(link->case)+chr(13)+"If this is not the one you need, hit "+chr(39)+"Page Down"+chr(39)+" until you retrieve the right one.",64)
                    	  ELSE
                    		UI_MSG_BOX(agency+" - FIND","Case Number "+ut(caseno)+" Does NOT exist in the System!"+chr(13)+"Please check the number and try again.",16)
                    		goto retry1
                    	end if
                    	end
                    TBL2.CLOSE()
                    end if	
                    if search_by="SSN" then
                    checksoc:
                    	if len(alltrim(ssnn))<>9 .and. len(alltrim(ssnn))<>11
                    		ui_msg_box(agency+" - Find","Length of SSN entered is Invalid.  Please try again.")
                    		goto retry1
                    	end if
                    	soc1=padr(trim(ssnn),13," ")	
                    '	'*******************************************************************
                    	INDX_1 = tbl.index_primary_put("ssn")
                    	rec= tbl.fetch_find(soc1)
                    	if rec > 0
                    		parentform.resynch()
                    		'Check to see if this ssn exists in someone elses  household
                    		CLSSN = lookupc("F",left(SOC1,11),"CLSSN","househol.dbf","ssn")
                    		IF CLSSN > "             " THEN
                    			clname = alltrim(lookupc("F",clssn,"FNAME","Client.dbf","ssn"))+" "+trim(lookupc("F",clssn,"lNAME","Client.dbf","ssn"))
                    			ansc =UI_MSG_BOX(agency+" - FIND","This person Also exists in the HOUSEHOLD of a Customer by the name of -  "+chr(13)+chr(13)+ut(clname)+chr(13)+chr(13)+"Do you want to display "+clname+"'s Customer's Information?",52)
                    			if ansc = 6
                    				Soc1 = clssn
                    				tbl.fetch_find(soc1)
                    				parentform.Resynch()
                    			end if			
                    		end if
                    		'*******************************************************************
                    '		parentform.Refresh_Layout() 
                    	  ELSE
                    		UI_MSG_BOX(agency+" - FIND","Customer SSN Does NOT exist in Client Info. Checking Medicaid!",16)
                    		med_file = TABLE.open(AA.BCBSS.PATH+"\medicaid\medicaid.dbf",FILE_RO_SHARED)
                    		MED_FILE.index_primary_put("ssn")
                    		FOUND=MED_FILE.fetch_fiND(SOC1)
                    		If found > 0 then
                    			ans2 = ui_msg_box(agency+" - FIND","A Client with this SSN     "+TRANSFORM(trim(ssn),"@R XXX-XX-XXXXXX")+ chr(13)+"Has been found in the MEDICAID Database "+CHR(13)+"Case Number   "+TRANSFORM(trim(MED_FILE.medicaidno),"@R XX XX XXXXXX")+CHR(13)+" Do you want to see this case?",36)	
                    			if ans2 = 6 then
                    				'display Medicaid Form
                    				dim A_FORM_CURRENT as c
                    				query.filter = "SSN = Client->ssn"
                    				query.order = ""
                    				callother("NEW FORM RETRO VIEW","\medicaid\medicaid.dbf")
                    		  	  else
                    				ui_msg_box(agency+" - FIND","A Client with this SSN - "+trim(ssn)+ chr(13)+"Does NOT Exist in the MEDICAID Database",16)	
                    			end if
                    		end if
                    		MED_FILE.close()
                    		UI_MSG_BOX(agency+" - FIND","Customer SSN Does NOT exist in System. Checking Household!",16)
                    		CLSSN = lookupc("F",SOC1,"CLSSN","househol.dbf","ssn")
                    		IF CLSSN > "             " THEN
                    			clname = alltrim(lookupc("F",clssn,"FNAME","Client.dbf","ssn"))+" "+trim(lookupc("F",clssn,"lNAME","Client.dbf","ssn"))
                    			UI_MSG_BOX(agency+" - FIND","This person Also exists in the HOUSEHOLD of a Customer by the name of -  "+chr(13)+chr(13)+ut(clname)+chr(13)+chr(13)+"Displaying "+clname+"'s Customer's Information?")
                    			soc1 = clssn
                    			tbl.fetch_find(soc1)
                    			parentform.resynch()
                    		  else
                    			UI_MSG_BOX(agency+" - FIND","Customer SSN Does NOT exist in System. Please Search by some other Key!",16)
                    			GOTO retry1
                    		end if
                    	end if
                    	end
                    end if
                    if left(search_by,4)="Full" then
                    FULLNAME:
                    debugcheck()
                    	DIM NAMES(100) as C
                    	names.clear()
                    	i = 1
                    	dim tblc as P
                    	tblc = table.open("client",FILE_RO_SHARED)
                    	fname1=TRIM(LNAME)+" "+TRIM(FNAME)
                    	fname2	= ut(FNAME)+" "+UT(LNAME)
                    	indx_2 = tblc.index_primary_put("Fullname")
                    	rec = tblc.fetch_find(FNAME1)
                    '	if rec > 0
                    'new code added here for selection
                    	if rec < 0  then
                    		'play_sound("g:\BCBSS\UH_OH.wav")
                    		UI_MSG_BOX(agency+" - FIND","Customer Entered -  "+chr_multi(13,2)+ut(fname)+" "+ut(lname)+",  DOB - "+DTOC(DOB)+chr_multi(13,2)+"Does NOT exist in our System,"+chr_multi(13,2)+"Please check the spelling and Date of Birth,"+chr_multi(13,2)+"IF it correct,"+chr_multi(13,2)+space(10)+"They may be a NEW Customer.",16)
                    		goto retry1
                    	  else
                    		tblkey = trim(tblc.lname)+" "+trim(tblc.fname)
                    		wordct= W_COUNT(tblkey)		
                    		while tblkey = fname1
                    			Names[i]=ut(tblc.fname)+" "+ut(tblc.lname)+" -  SSN: "+left(tblc.ssn,3)+"-"+substr(tblc.ssn,4,2)+"-"+trim(substr(tblc.ssn,6,7))+" - Addr: "+trim(tblc.addr1)+" - Born on: "+dtoc(tblc.dob)
                    			tblc.fetch_next()
                    			i = i+1
                    			tblkey = trim(tblc.lname)+" "+trim(tblc.fname)
                    		end while
                    		'added by hubert
                    		'************************************* 
                    		tblc.close()
                    		'**************************************	
                    		if i = 2
                    			SSNN = alltrim(remspecial(word(names(1),wordct+3)))
                    			'goto checksoc
                    			soc1=padr(trim(ssnn),13," ")	
                    			INDX_1 = tbl.index_primary_put("ssn")
                    			rec= tbl.fetch_find(soc1)
                    			if rec > 0
                    				tbl.index_primary_put("Fullname")
                    				parentform.resynch()
                    				end
                    			end if
                    		end if
                    		names.resize(i-1)
                    		names.sort("A","dtos(ctod(word(value,-1)))")
                    				
                    		dim name1 as C
                    		name1 = ""
                    		name1 = "We found "+ alltrim(str(i-1,4,0))+" "+replace_parameters(" matches for the name [varC->FNAME2]!  THIS LIST IS IN BIRTH DATE ORDER.",local_variables())
                    		name3 = "Please check this list carefully before entering a New Cusomer!"
                    		tryagain1:
                    		DIM SHARED WHO as C
                    		DIM SHARED varC_result as C
                    		ok_button_label = "&YES"
                    		cancel_button_label = "&NO"
                    		varC_result = ui_dlg_box(Agency + " Customer Information",<<%dlg%
                    		{region}
                    		{text=130:name1};
                    		{text=130:name3};
                    		{line=1,0};
                    		{endregion};
                    		{region}
                    		Please Select: |[.100,8WHO^#names];
                    		{endregion};
                    		{line=1,0};
                    		{region}
                    		<*15=ok_button_label!OK> <15=cancel_button_label!NO>
                    		{endregion};
                    		%dlg%)
                    		if varC_result="NO"
                    			ui_msg_box(agency+" Customer Search","Action Cancelled at user request")
                    			end
                    		end if
                    		if who = ""
                    			'no client selected, retry
                    			ui_msg_box(agency+" Customer Select","No Selection was made, Please Select a Name")
                    			goto tryagain1
                    		end if
                    		ssnn = padr(alltrim(remspecial(word(who,wordct+3))),13," ")
                    		soc1=padr(trim(ssnn),13," ")	
                    		INDX_1 = tbl.index_primary_put("ssn")
                    		rec= tbl.fetch_find(soc1)
                    		if rec > 0
                    			tbl.index_primary_put("Fullname")
                    			parentform.resynch()
                    			end
                    		end if
                    	end if
                    	end
                    end if
                    if search_by="Last Name" then
                    	lname2=padr(trim(lname)+" A",25," ")
                    	indx_3 = tbl.index_primary_put("Fullname")
                    	'fetch_first(db_current())
                    	rec = tbl.fetch_find(lname2)
                    	if tbl.lname <> lname  then
                    		'play_sound("g:\BCBSS\UH_OH.wav")
                    		UI_MSG_BOX(agency+" - FIND","Customer Name -  "+chr(13)+chr(13)+ut(lname)+chr(13)+chr(13)+"Does NOT exist in our System,"+chr(13)+chr(13)+"Please check the spelling,"+chr(13)+space(10)+"OR"+chr(13)+"They may be a NEW Customer.",16)
                    		goto retry1
                    	  else
                    		parentform.resynch()						
                    		UI_MSG_BOX(agency+" - FIND","This is the FIRST customer with a Last name of"+chr(13)+chr(13)+ut(lname)+chr(13)+chr(13)+"If this is not who you need, hit "+chr(39)+"Page Down"+chr(39)+" until you retrieve your Customer",64)
                    	end if
                    	end
                    end if
                    if search_by="Last Name 1st Initial" then
                    reenter:
                    	lfname1=ut(lname)+", "+ut(int)
                    	dim names[400] as C
                    	names.clear()
                    	i = 1
                    	dim tblc as P
                    	tblc = table.open("client",FILE_RO_SHARED)
                    	indx_2 = tblc.index_primary_put("LastFirst")
                    	'fetch_first(db_current())
                    	rec = tblc.fetch_find(LFNAME1)
                    	'new code added here for selection
                    	if rec < 0  
                    		if LNAME2 <>""
                    			if ut(lname2) <> ut(lname)
                    				UI_MSG_BOX(agency+" - FIND","Customer Entered -  "+chr_multi(13,2)+ut(int)+" "+ut(lname)+",  DOB - "+DTOC(DOB)+chr_multi(13,2)+"Does NOT exist in our System,"+chr_multi(13,2)+"Checking by \"Other Name\", "+LNAME2,16)
                    				LNAMEOLD = LNAME
                    				LNAME = LNAME2
                    				GOTO REENTER
                    			  else
                    			  	UI_MSG_BOX(agency+" - FIND","Customer Entered -  "+chr_multi(13,2)+ut(int)+" "+ut(lname)+",  DOB - "+DTOC(DOB)+chr_multi(13,2)+"Does NOT exist in our System,"+chr_multi(13,2)+"Please check the spelling and Date of Birth,"+chr_multi(13,2)+"IF it is correct,"+chr_multi(13,2)+space(10)+"They may be a NEW Customer.",16)
                    				goto retry1
                    			end if
                    		  ELSE
                    		'play_sound("g:\BCBSS\UH_OH.wav")
                    			UI_MSG_BOX(agency+" - FIND","Customer Entered -  "+chr_multi(13,2)+ut(int)+" "+ut(lname)+",  DOB - "+DTOC(DOB)+chr_multi(13,2)+"Does NOT exist in our System,"+chr_multi(13,2)+"Please check the spelling and Date of Birth,"+chr_multi(13,2)+"IF it is correct,"+chr_multi(13,2)+space(10)+"They may be a NEW Customer.",16)
                    			goto retry1
                    		end if
                    	  else
                    		tblkey = trim(tblc.lname)+", "+ut(left(tblc.fname,1))
                    		while tblkey = lfname1
                    			if dob <>{} 
                    				if tblc.Dob = dob
                    			  		Names[i]=ut(tblc.fname)+" "+ut(tblc.lname)+" -  SSN: "+left(tblc.ssn,3)+"-"+substr(tblc.ssn,4,2)+"-"+trim(substr(tblc.ssn,6,7))+" - Addr: "+trim(tblc.addr1)+" - Born on: "+dtoc(tblc.dob)
                    					i = i+1
                    				end if
                    			  else
                    			  		Names[i]=ut(tblc.fname)+" "+ut(tblc.lname)+" -  SSN: "+left(tblc.ssn,3)+"-"+substr(tblc.ssn,4,2)+"-"+trim(substr(tblc.ssn,6,7))+" - Addr: "+trim(tblc.addr1)+" - Born on: "+dtoc(tblc.dob)
                    					i = i+1
                    			end if
                    				tblkey = trim(tblc.lname)+", "+ut(left(tblc.fname,1))
                    				tblc.fetch_next()	
                    		end while
                    		'added by hubert
                    		'************************************* 
                    		tblc.close()
                    		'**************************************	
                    		if i = 2
                    			if word(names(1),5)="SSN"
                    				SSNN = alltrim(remspecial(word(names(1),6)))
                    			  else
                    			  	SSNN = alltrim(remspecial(word(names(1),5)))
                    			end if
                    
                    			'goto checksoc
                    			soc1=padr(trim(ssnn),13," ")	
                    			INDX_1 = tbl.index_primary_put("ssn")
                    			rec= tbl.fetch_find(soc1)
                    			if rec > 0
                    				tbl.index_primary_put("Fullname")
                    				parentform.resynch()
                    				end
                    			end if
                    		end if
                    		names.resize(i-2)
                    		names.sort("A","word(value,1)+dtos(ctod(word(value,-1)))")
                    				
                    		dim name1 as C
                    		name1 = ""
                    		name1 = "We found "+ alltrim(str(i-2,4,0))+" "+replace_parameters(" matches for the name [varC->LFNAME1]!  THIS LIST IS IN FIRST NAME ORDER.",local_variables())
                    		name3 = "Please check this list carefully before entering a New Cusomer!"
                    		tryagain5:
                    		DIM SHARED WHO as C
                    		DIM SHARED varC_result as C
                    		ok_button_label = "&YES"
                    		cancel_button_label = "&NO"
                    		varC_result = ui_dlg_box(Agency + " Customer Information",<<%dlg%
                    		{region}
                    		{text=130:name1};
                    		{text=130:name3};
                    		{line=1,0};
                    		{endregion};
                    		{region}
                    		Please Select: |[.110,15WHO^#names];
                    		{endregion};
                    		{line=1,0};
                    		{region}
                    		<*15=ok_button_label!OK> <15=cancel_button_label!NO>
                    		{endregion};
                    		%dlg%)
                    		if varC_result="NO"
                    			ui_msg_box(agency+" Customer Search","Action Cancelled at user request")
                    			end
                    		end if
                    		if who = ""
                    			'no client selected, retry
                    			ui_msg_box(agency+" Customer Select","No Selection was made, Please Select a Name")
                    			goto tryagain5
                    		end if
                    		if word(who,5)="SSN"
                    			SSNN = padr(alltrim(remspecial(word(who,6))),13," ")
                    		  else
                    		  	SSNN = padr(alltrim(remspecial(word(who,5))),13," ")
                    		end if
                    		'ssnn = padr(alltrim(remspecial(word(who,5))),13," ")
                    		soc1=padr(trim(ssnn),13," ")	
                    		INDX_1 = tbl.index_primary_put("ssn")
                    		rec= tbl.fetch_find(soc1)
                    		if rec > 0
                    			tbl.index_primary_put("Fullname")
                    			parentform.resynch()
                    			end
                    		end if
                    	end if
                    	end
                    end if
                    '******************  NEW 01/16/2008  ****************************
                    if search_by="Last, First, DOB" then
                    	FNAME = FNAME1
                    	'debug(1)
                    	DIM NAMES(20) as C
                    	names.clear()
                    	i = 1
                    	dim tblc as P
                    	tblc = table.open("client",FILE_RO_SHARED)
                    	lname2=padr(trim(lname),25," ")+padr(trim(fname),20," ")+dtos(dob)
                    	indx_3 = tblc.index_primary_put("LFDOB")
                    	'fetch_first(db_current())
                    	rec = tblc.fetch_find(lname2)
                    	if rec < 0  then
                    		UI_MSG_BOX(agency+" - FIND","Customer Entered -  "+chr_multi(13,2)+ut(fname)+" "+ut(lname)+",  DOB - "+DTOC(DOB)+chr_multi(13,2)+"Does NOT exist in our System,"+chr_multi(13,2)+"Please check the spelling and Date of Birth,"+chr_multi(13,2)+"IF it correct,"+chr_multi(13,2)+space(10)+"They may be a NEW Customer.",16)
                    		goto retry1
                    	  else
                    		tblkey = tblc.lname+tblc.fname+dtos(tblc.dob)		
                    		while tblkey = lname2
                    			Names[i]=ut(tblc.fname)+" "+ut(tblc.lname)+" -  SSN: "+left(tblc.ssn,3)+"-"+substr(tblc.ssn,4,2)+"-"+trim(substr(tblc.ssn,6,7))+" - Addr: "+trim(tblc.addr1)+" - Born on: "+dtoc(tblc.dob)
                    			tblc.fetch_next()
                    			i = i+1
                    			tblkey = tblc.lname+tblc.fname+dtos(tblc.dob)				   
                    		end while
                    		'added by hubert
                    		'************************************* 
                    		tblc.close()
                    		'**************************************	
                    		if i = 2
                    			if word(names(1),5)="SSN"
                    				SSNN = alltrim(remspecial(word(names(1),6)))
                    			  else
                    			  	SSNN = alltrim(remspecial(word(names(1),5)))
                    			end if
                    			'SSNN = alltrim(remspecial(word(names(1),5)))
                    			goto checksoc
                    		end if
                    		names.resize(i-1)		
                    		dim name1 as C
                    		name1 = ""
                    		dim namex as C
                    		namex = word(names[1],1)+" "+word(names[1],2)
                    		name1 = replace_parameters("Is One of these the Correct Customer record for [varC->namex]?",local_variables())
                    		tryagain2:
                    		DIM SHARED WHO as C
                    		DIM SHARED varC_result as C
                    		ok_button_label = "&YES"
                    		cancel_button_label = "&NO"
                    		varC_result = ui_dlg_box(Agency + " Customer Information",<<%dlg%
                    		{region}
                    		{text=70:name1};
                    		{line=1,0};
                    		{endregion};
                    		{region}
                    		Please Select: |[.100,5WHO^#names];
                    		{endregion};
                    		{line=1,0};
                    		{region}
                    		<*15=ok_button_label!OK> <15=cancel_button_label!NO>
                    		{endregion};
                    		%dlg%)
                    		if varC_result="NO"
                    			ui_msg_box(agency+" Customer Search","Action Cancelled at user request")
                    			end
                    		end if
                    		if who = ""
                    			'no client selected, retry
                    			ui_msg_box(agency+" Customer Select","No Selection was made, Please Select a Name")
                    			goto tryagain2
                    		end if
                    		if word(who,5)="SSN"
                    				SSNN = padr(alltrim(remspecial(word(who,6))),13," ")
                    			  else
                    			  	SSNN = padr(alltrim(remspecial(word(who,5))),13," ")
                    		end if
                    		'ssnn = padr(alltrim(remspecial(word(who,5))),13," ")
                    		goto checksoc
                    	end if
                    end if
                    '******************************************************************************						
                    if search_by="Investigations" then
                    	addr=STATE+padr(trim(LEFT(CITY,5)),5," ")+LEFT(WORD(ADDR,2),7)+WORD(ADDR,1)
                    	debugcheck()
                    	tbl.index_primary_put("ADDRESS")
                    	'fetch_first(db_current())
                    	rec = tbl.fetch_find(addr)
                    	if rec >0  then
                    		parentform.resynch()
                    		ui_msg_box(agency+" - FIND","A Customer with this Address Exists! Please check that this is the Customer you requested.",16)
                    	  ELSE
                    		UI_MSG_BOX(agency+" - FIND","Customer Address Does NOT exist in System, may be a NEW Customer.",16)
                           	goto retry1
                    	end if
                    	
                    end if
                    end
                    screen shots of the different selections are attached.

                    Tom

                    Comment


                      #11
                      Re: xdialog radio buttons

                      charlie,
                      Why mess with all that, especially that monstrosity Listview code!! If they want Jill, or Tom, or Williams, or Jones, or McCormick, or Larry.... let them type that and have the progressive look up find it regardless. You don't have to designate first or last names to accomplish it. But if you must have it designanted, OK. See the attached example.

                      Later...new example
                      Last edited by Mike Wilson; 10-27-2010, 04:32 PM. Reason: new example
                      Mike W
                      __________________________
                      "I rebel in at least small things to express to the world that I have not completely surrendered"

                      Comment

                      Working...
                      X