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

xDlg - Check Box List Events

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

  • xDlg - Check Box List Events

    Hi All,

    How do you write for Check box-List Box event on the xDialog?

    Code:
    'Create an XDialog dialog box to prompt for parameters.
    DIM SHARED vFilterStatus as C
    DIM SHARED vFilterFrom as D
    DIM SHARED vFilterTo as D
    DIM SHARED vFilterAmt as N
    DIM SHARED vLists as C
    dim shared vTypeList as c
    dim shared vQueryList as c
    DIM SHARED varC_result as C
    DELETE a_vFilterStatus		
    DIM a_vFilterStatus[3] as c
    dim temp_list as c 
    temp_list = <<%list%
    Completed
    Current
    Future
    %list%
    
    a_vFilterStatus.initialize(temp_list)
    
    Query_vlist_org = table.external_record_content_get("contracts","Contract_Shortname","Contract_shortname",[SIZE="4"][COLOR="Red"]"Job_status="+quote(vFilterStatus)[/COLOR][/SIZE])
    
    query_count = w_count(query_vlist_org,crlf())
    DELETE query_vLists
    DIM query_vLists[query_count] as c
    query_vLists.initialize(query_vlist_org)
    
    [COLOR="Blue"]'How to get the Filter value whenever vFilterStatus is changed the value?[/COLOR]
    
    'Using Keylist_build
    DIM vKey_Lists_orig as C 
    vkey_Lists_orig = "k=contracts,{keylist_build(\"H=.05,1:40[Contract_Shortname]\",''+Project_id,left(''+Contract_shortname,40))}{Job_status = [varC->vFilterStatus]}"
    DIM vKey_Lists as C 
    vKey_Lists = replace_parameters(vKey_Lists_orig,local_variables())
    
    'vkey_count = w_count(vKey_list_org,crlf()) 'Error, I think Not able to Count the records
    'DELETE vKey_lists
    'DIM vKey_lists[vkey_count] as c
    'vKey_lists.initialize(vKey_lists_org) 'Error
    
    
    'Status:| [%v%.17vFilterStatus^=a_vFilterStatus]; 'Original
    ok_button_label = "&OK"
    cancel_button_label = "&Cancel"
    varC_result = ui_dlg_box("Contract Filtered List",<<%dlg%
    {region}
    
    Status:| [%v%.17vFilterStatus^=a_vFilterStatus!vFilterStatus_changed];
    From:| [%DATE;P=popup.calendar(dtoc(vFilterFrom));I=popup.calendar%.20vFilterFrom!vFilterFrom_*];
    To:| [%DATE;P=popup.calendar(dtoc(vFilterTo));I=popup.calendar%.20vFilterTo!vFilterTo_*];
    Amount:| [%z%.20vFilterAmt];
    {lf};
    
    Variable Job Status Filter List:| [.40,5query_vLists^$$query_vLists];
    KeyList Job Status Filter List:| [.40,5vKey_Lists^$$vKey_Lists];
    {endregion};
    {line=1,0};
    {region}
    <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
    {endregion};
    %dlg%,<<%code%
    [COLOR="Red"]'Event for Query_list
    If a_dlg_button = "vFilterStatus_changed" then 
    	'Query_vLists = replace_parameters(Query_vLists_org,local_variables())
    	query_vlists.initialize(query_vlist_org)
    
    	a_dlg_button = ""
    end if [/COLOR]
    
    'Event for vKeylist_build
    If a_dlg_button = "vFilterStatus_changed" then 
    	vKey_Lists = replace_parameters(vkey_Lists_orig,local_variables())
    	a_dlg_button = ""
    end if 
    
    if left(a_dlg_button,12) = "vFilterFrom_" then 
    	if a_dlg_button = "vFilterFrom_killfocus" then 
    		vFilterFrom = ctod(dtoc(vFilterFrom))
    	end if 
    	a_dlg_button = ""
    end if 
    
    if left(a_dlg_button,10) = "vFilterTo_" then 
    	if a_dlg_button = "vFilterTo_killfocus" then 
    		vFilterTo = ctod(dtoc(vFilterTo))
    	end if 
    	a_dlg_button = ""
    end if
    %code%)
    On my scripts, Whenever I changed the value of the vFilterStatus, I'd like to have new Check box list on the variable Job Status Filter List.

    Question - 2: Is Keylist_build() able to create the Check Box?

  • #2
    Re: xDlg - Check Box List Events

    First, the way you are using the vFilterStatus variable in the function scares me a bit. If you change it in this script, it will also change it elsewhere because it's a shared variable. Is that really what you want?

    Personally, I hate using keylist build so I haven't used it in years and won't even attempt to address that method. I think it's way to complex for any kind of "manual" editing.

    I don't have your table to work from so this hasn't been tested but below is my best guess as to something that should work.

    - I took some liberties and did some cleanup that I believe makes it easier to read and understand.
    - I don't know why A5 always converts crlf lists to arrays before using them in lists - it isn't necessary. Just use the crlf list.
    - The Alpha genie always sets button text by setting a variable first. This is almost never necessary and just adds confusion as far as I'm concerned. (Although I do see the need for it in the genie.)
    - I'm not sure what some parts of the xdialog are doing. I basically ignored anything not directly related to the "filter status" and "job list".

    Code:
    'Create an XDialog dialog box to prompt for parameters.
    DIM SHARED vFilterStatus as C
    DIM SHARED vFilterFrom as D
    DIM SHARED vFilterTo as D
    DIM SHARED vFilterAmt as N
    'DIM SHARED vLists as C     'Not used here.
    'DIM SHARED vTypeList as C    'Not used here.
    'DIM SHARED vQueryList as C    'Not used here.
     
    'This should not normally be shared. Any result is best 
    'handled separately and then passed back - IF necessary.
    DIM varC_result as C
     
    DIM status_list as C
    status_list = <<%list%
    Completed
    Current
    Future
    %list%
     
    job_list = table.external_record_content_get( "contracts", "Contract_Shortname", "Contract_shortname", "Job_status=" + quote( vFilterStatus ) )
     
    varC_result = ui_dlg_box( "Contract Filtered List", <<%dlg%
    {region}
    Status:| [%v%.17vFilterStatus^=status_list!vFilterStatus_changed];
    From:| [%DATE;P=popup.calendar(dtoc(vFilterFrom));I=popup.calendar%.20vFilterFrom!vFilterFrom_*];
    To:| [%DATE;P=popup.calendar(dtoc(vFilterTo));I=popup.calendar%.20vFilterTo!vFilterTo_*];
    Amount:| [%z%.20vFilterAmt];
    {lf};
    Variable Job Status Filter List:| [.40,5query_vLists^$$job_list];
    {endregion};
    {line=1,0};
    {region}
    <*15OK> <15Cancel>
    {endregion};
    %dlg%,<<%code%
    'Event for Query_list
    IF a_dlg_button = "vFilterStatus_changed"
        query_vLists = ""    'Clear the result since the list is changing.
        job_list = table.external_record_content_get( "contracts", "Contract_Shortname", "Contract_shortname", "Job_status=" + quote( vFilterStatus ) )
        a_dlg_button = ""
    ELSEIF left( a_dlg_button, 12 ) = "vFilterFrom_"
        IF a_dlg_button = "vFilterFrom_killfocus"
            vFilterFrom = ctod( dtoc( vFilterFrom ) )
        END IF
        a_dlg_button = ""
    ELSEIF left( a_dlg_button, 10 ) = "vFilterTo_"
        IF a_dlg_button = "vFilterTo_killfocus"
            vFilterTo = ctod( dtoc( vFilterTo ) )
        END IF
        a_dlg_button = ""
    END IF
    %code% )

    Comment


    • #3
      Re: xDlg - Check Box List Events

      Cal,

      What is the Return Value After I selected a few jobs?
      Is the return value Record number of table or a string of Job name?

      Can you teach me how to save those select jobs as "<tbl>.Mark()" on the table and after Printed the records, release the "mark()"?

      Comment


      • #4
        Re: xDlg - Check Box List Events

        The return value is a crlf() delimited list of the 'contract_shorname' value(s) checked in the dialog's Variable Job Status Filter List field. The list of the checked contract_shortnames is held in the variable query_vLists(in red below). The code that follows will process the list of the chosen contracts marking the records in the Contracts table for each.

        Code:
        'Create an XDialog dialog box to prompt for parameters.
        DIM SHARED vFilterStatus as C
        DIM SHARED vFilterFrom as D
        DIM SHARED vFilterTo as D
        DIM SHARED vFilterAmt as N
        'DIM SHARED vLists as C     'Not used here.
        'DIM SHARED vTypeList as C    'Not used here.
        'DIM SHARED vQueryList as C    'Not used here.
         
        'This should not normally be shared. Any result is best 
        'handled separately and then passed back - IF necessary.
        DIM varC_result as C
         
        DIM status_list as C
        status_list = <<%list%
        Completed
        Current
        Future
        %list%
         
        job_list = table.external_record_content_get( "contracts", "Contract_Shortname", "Contract_shortname", "Job_status=" + quote( vFilterStatus ) )
         
        varC_result = ui_dlg_box( "Contract Filtered List", <<%dlg%
        {region}
        Status:| [%v%.17vFilterStatus^=status_list!vFilterStatus_changed];
        From:| [%DATE;P=popup.calendar(dtoc(vFilterFrom));I=popup.calendar%.20vFilterFrom!vFilterFrom_*];
        To:| [%DATE;P=popup.calendar(dtoc(vFilterTo));I=popup.calendar%.20vFilterTo!vFilterTo_*];
        Amount:| [%z%.20vFilterAmt];
        {lf};
        Variable Job Status Filter List:| [.40,5[COLOR="Red"]query_vLists[/COLOR]^$$job_list];
        {endregion};
        {line=1,0};
        {region}
        <*15OK> <15Cancel>
        {endregion};
        %dlg%,<<%code%
        'Event for Query_list
        IF a_dlg_button = "vFilterStatus_changed"
            query_vLists = ""    'Clear the result since the list is changing.
            job_list = table.external_record_content_get( "contracts", "Contract_Shortname", "Contract_shortname", "Job_status=" + quote( vFilterStatus ) )
            a_dlg_button = ""
        ELSEIF left( a_dlg_button, 12 ) = "vFilterFrom_"
            IF a_dlg_button = "vFilterFrom_killfocus"
                vFilterFrom = ctod( dtoc( vFilterFrom ) )
            END IF
            a_dlg_button = ""
        ELSEIF left( a_dlg_button, 10 ) = "vFilterTo_"
            IF a_dlg_button = "vFilterTo_killfocus"
                vFilterTo = ctod( dtoc( vFilterTo ) )
            END IF
            a_dlg_button = ""
        END IF
        %code% )
        
        'Mark the selected record in the table
        	dim t as p
        	dim vFW as C
        	dim vfilter as C
        	
        	'open the table for marking
        	t=table.open("contracts")
        	
        	'loop thru the chosen items now in the query_vLists variable
        	for each foo in query_vlists
        		vFW=alltrim(foo.value)
        		
        		'set the filter for the table for the current contract_shortname
        		vfilter="contract_shortname="+quote(vFW)
        		
        		'filter the table to the contract_shortname value in the current loop
        		xi=t.order("",vfilter)
        		
        		'change the record to be marked
        		t.change_begin()
        		t.mark()
        		t.change_end(.t.)
        	next
        		t.close()
        
        'print records
        '>>>> print record code here.  Make thru genie.  I don't have report to print
        
        ' example notice, not needed in script
        	dim vtext as C="Printing "+crlf_to_comma(query_vLists)
        	ui_modeless_dlg_box("printing",<<%dlg%
        	{background=yellow}{nocaption}
        	{lf};
        	{text=40,2vtext};
        	{lf};
        	%dlg%)
        	sleep(2)
        	ui_modeless_dlg_close("printing")
        
        'unmark mark
        	t=table.open("contracts")
        	xi=t.order("","Marked()=.t.")
        	t.fetch_first()
        	while .not. t.fetch_eof()
         	     t.change_begin()
           	     t.unmark()
        	     t.change_end(.t.)
        	t.fetch_next()
        	end while
        	t.close()
        Last edited by Mike Wilson; 01-03-2011, 03:33 PM.
        Mike W
        __________________________
        "I rebel in at least small things to express to the world that I have not completely surrendered"

        Comment


        • #5
          Re: xDlg - Check Box List Events

          Mike,

          Thank you.

          Now, I want to print the reports or labels, Can I use the one of your code instead of "<tbl>.mark()"?

          Re: Multiple Selection In An Xdialog Keylist_build
          http://msgboard.alphasoftware.com/al...=keylist_build
          Code:
          IF left( a_dlg_button, 5 ) = "newd_"
          	 IF a_dlg_button = "newd_change"
          	 	if vcycle=1
          	 		vselected = ""
          			vcustid_chosen=""
          			vcycle=vcycle+1	
          		else
          			' assure the chosen customer has an invoice
          			if exist(vcid,"invoice_header","Customer_I")
          				' check to see if this has already been chosen 
          				if is_one_of(vcid,vcustid_chosen)=.F.
          					vfn = alltrim(lookup("customer","customer_id="+quote(vcid),"firstname"))
          					vln = alltrim(lookup("customer","customer_id="+quote(vcid),"lastname"))
          					vselected= vselected+vfn+" "+vln+crlf()
          		 			vcustid_chosen = vcustid_chosen+alltrim(vcid)+crlf()
          		 		end if
          		 	else
          		 		msgbox("Notice","No invoice exists for this customer")
          		 	end if
          		end if
          	 END IF
          	 a_dlg_button = ""
          	END IF
          	
          	if a_dlg_button = "ok" then
          		flagOK = .t.
          	else if a_dlg_button = "cancel"
          		end 
          	end if
          	%code%)
          
          
          if flagOK = .t. then
          	msgbox("Seleced customer id's",vcustid_chosen)
          	dim vfilter as C = ""
          	dim vLenum as N
          	dim vIW as C
          	vLenum = w_count(vcustid_chosen,crlf())
          
          	vfilter = "customer_id="+chr(92)+chr(34)+word(vcustid_chosen,1,crlf())+chr(92)+chr(34)
          
          	for i = 2 to vLenum
          		vIW = alltrim(word(vcustid_chosen,i,crlf()))
          		vfilter= vfilter +" .or. customer_id="+chr(92)+chr(34)+vIW+chr(92)+chr(34)
          	next
          	vfilter = chr(34)+vfilter+chr(34)
          	label.Preview("invoice billing labels",eval(vfilter))
          end if

          Comment


          • #6
            Re: xDlg - Check Box List Events

            John, I added sme code to the prior post, see if that helps. You'll have to write the report print through the genie, and add it in.
            Mike W
            __________________________
            "I rebel in at least small things to express to the world that I have not completely surrendered"

            Comment


            • #7
              Re: xDlg - Check Box List Events

              Thanks, Mike. I've been busy all afternoon and just now saw the message. Looks like you've said about the same thing I would have.

              Comment


              • #8
                Re: xDlg - Check Box List Events

                Thanks, Mike and Cal

                Comment


                • #9
                  Re: xDlg - Check Box List Events

                  Cal,
                  First, the way you are using the vFilterStatus variable in the function scares me a bit. If you change it in this script, it will also change it elsewhere because it's a shared variable. Is that really what you want?
                  * I am not sure but
                  (1) Whenever I used the ActionScript (xDialog Box), the Alpha creates as "dim Shared ...."

                  (2) Can the shared variable be shared within, as long as related each codings?

                  (3) I have a Parent xDlg and Child xDlg, here attached the sample codes. I want to get the value from child xDlg or form Parent xDlg. How can I get the field value without "Dim Shared variable"? Is the other way not scare you, Cal?

                  Code:
                   
                  dim vName as c
                  dim vResultCo as c
                  'vResultCo = replace_parameters(vCompany,local_variables()) 'Which came from Child but It did not work like here
                  
                  ui_modeless_dlg_box("ParentDialog",<<%dlg%
                  
                  Name:| [.20vname];
                  {sp=2} (openxdlg!CheckBox) Open Company xdlg?;
                  Result value from Child xDlg:| [.20vResultCo];
                  <Open xdlg!xDlg>;
                  
                  {lf=2};
                  {line=1,0};
                  {region}
                  <Save>{sp}<Hello>{sp}<company>{sp}<Close>;
                  {endregion};
                  %dlg%,<<%code%
                  
                  if a_dlg_button = "Hello" then
                  	ui_msg_box("","Another message from the parent dialog")
                  	show_embedded(local_variables()) 'When I deledted local_variables(), Not work
                      'ui_dlg_event("ChildDialog","Hello",.t.)
                  end if
                  
                  if a_dlg_button = "Company" then
                  	ui_msg_box("","Another message from the parent dialog")
                  	ui_dlg_event("ChildDialog","Hello",.t.) 'It did not open the childDlg
                  end if
                  
                  if a_dlg_button = "xDlg" then
                      a_dlg_button = ""
                      show_embedded(local_variables())
                  end if
                  
                  if a_dlg_button = "checkbox" then
                      a_dlg_button = ""
                      if openxdlg =.t. then
                      show_embedded(local_variables())
                      end if
                  end if
                  
                  if a_dlg_button = "close" then
                      ui_modeless_dlg_close("ParentDialog")
                  end if
                  
                  if a_dlg_button ="save" then
                  	'Save to table
                  	dim t as p
                  	t=table.open("test")
                  	t.fetch_last()
                  		t.enter_begin()
                  		t.name = vName
                  		t.company=vCompany
                  	t.enter_end(.t.)
                  	t.close()
                  end if
                  %code%) 'End of the 1st xdlg scripts
                  end
                  *** Child xDlg (Code Page 2) *********
                  Code:
                  FUNCTION show_embedded AS C (vars AS P )
                  	dim shared vCompany as c	
                      with vars
                  ui_modeless_dlg_box("ChildDialog",<<%dlg%
                  {wrap=40}
                  
                  {lf};
                  Company: [.20vCompany];
                  {lf};
                  {lf};
                  <Hello>  <close>;
                  %dlg%,<<%code%
                  if a_dlg_button = "Hello" then
                      'sleep(2)
                      ui_msg_box("Company","Hello: " + vCompany)
                  end if
                  if a_dlg_button="close" then
                  	ui_modeless_dlg_close("ChildDialog")
                      end 
                  end if
                  %code%)
                      end with
                  END FUNCTION
                  I have the bad experience because the coding was too long which I am not able to control the coding errors. So I stated to break a parts. This sample Style script and "Shared" is one of the reason I am still remained with "Shared".

                  I do not like the Keylist_build() but like the "Return Value".


                  Cal, Thank you for help always:)

                  Comment


                  • #10
                    Re: xDlg - Check Box List Events

                    I forgot that Alpha always seems to use Shared as the default in their genies. I presume there is a good reason for that but I've never checked since I almost never use the genies anymore.

                    It's probably not an issue at all. Just be aware that using that same variable name anywhere else under the same form will mean that the values are shared. If wierd stuff starts showing up, you know what to look for - otherwise don't worry about it.

                    Comment


                    • #11
                      Re: xDlg - Check Box List Events

                      Cal and Mike

                      How can I get the list value when I change the Date value?

                      Code:
                      'Create an XDialog dialog box to prompt for parameters.
                      DIM vFindDate as d '={12/8/10}
                      DIM vSchedule as C
                      DIM varC_result as C
                      vFilter = "Assign_date="+s_quote(vFindDate)
                      'auto_list_vSchedule = table.external_record_content_get("wrkodr_daily",\
                      '"Wrkodr_Id+' '+Assign_date+' '+Emp_Id+' '+Assignment","Emp_id+cdate(Assign_date)",vFilter)
                      
                      'Changed to other filter style
                      auto_list_vSchedule = table.external_record_content_get("wrkodr_daily",\
                      "Wrkodr_Id+' '+Emp_Id+' '+Assignment","Emp_id+cdate(Assign_date)","Assign_date ="+s_quote(Var->vFindDate))
                      
                      
                      temp_count = w_count(auto_list_vSchedule,crlf())
                      DELETE a_vSchedule
                      
                      DIM a_vSchedule[temp_count] as c
                      a_vSchedule.initialize(auto_list_vSchedule)
                      
                      ok_button_label = "&OK"
                      cancel_button_label = "&Cancel"
                      varC_result = ui_dlg_box("Daily Work Schedule",<<%dlg%
                      {region}
                      Find Date:| [%DATE;P=popup.calendar(dtoc(vFindDate));I=popup.calendar%.15vFindDate!vDate_Change];
                      List:| [.80,5vSchedule^#a_vSchedule];
                      {endregion};
                      {line=1,0};
                      {region}
                      <*15=ok_button_label!OK> <15=cancel_button_label!CANCEL>
                      {endregion};
                      %dlg%,<<%code%
                      
                      if a_dlg_button ="vDate_Change" then
                          vSchedule=""
                          auto_list_vSchedule = table.external_record_content_get("wrkodr_daily",\
                      "Wrkodr_Id+' '+Assign_date+' '+Emp_Id+' '+Assignment","Emp_id+cdate(Assign_date)",vFilter)
                          a_vSchedule.initialize(auto_list_vSchedule)
                      	a_dlg_button=""
                      end if
                      %Code%)
                      When I test with vFindDate Field value, this script is shown the records as I want it. However, I changed the date then this script did not change the records with date value.

                      Comment


                      • #12
                        Re: xDlg - Check Box List Events

                        Hi,

                        It works fine.

                        Code:
                        DIM vdate as D
                        DIM varC_result as C
                        vFilter= "Assign_date = "+s_quote(Var->vdate)
                        vOrder="lookup(\"emp\",\"emp_id=\"+quote(emp_id),\"alltrim(Emp_fullname)\")"
                        'vEmpNm = lookup("emp","emp_id="+quote(WrkOdr_Daily->Emp_Id),"alltrim(Emp_fullname)") 
                         
                        vDaylist = table.external_record_content_get( "wrkodr_daily",\
                        "lookup(\"emp\",\"emp_id=\"+quote(emp_id),\"alltrim(Emp_fullname)\")+' '+Assign_Date+' '+Wrkodr_Id+' '+Assignment+' '+Project_Id",\
                        vOrder,"Assign_date = "+s_quote(Var->vdate))
                        'Problem: Changed Emp_id to lookup()
                        
                         
                        varC_result = ui_dlg_box( "Contract Filtered List", <<%dlg%
                        {region}
                        Date:| [%DATE;P=popup.calendar(dtoc(vdate));I=popup.calendar%.20vdate!vdate_Change];
                        {lf};
                        Variable Job Status Filter List:|[.90,15vLists^$$vDaylist];
                        {endregion};
                        {line=1,0};
                        {region}
                        <*15OK> <15Cancel>
                        {endregion};
                        %dlg%,<<%code%
                        'Event for Query_list
                        IF a_dlg_button = "vdate_change" then
                            vLists = ""    
                            vDaylist = table.external_record_content_get( "wrkodr_daily",\
                        "lookup(\"emp\",\"emp_id=\"+quote(emp_id),\"alltrim(Emp_fullname)\")+' '+Assign_Date+' '+Wrkodr_Id+' '+Assignment+' '+Project_Id",\
                        vOrder,"Assign_date = "+s_quote(Var->vdate))
                        
                            a_dlg_button = ""
                        end if
                        %code% )
                        Thank you

                        Comment

                        Working...
                        X