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

Table Chr length change, no refresh ?

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

    Table Chr length change, no refresh ?

    I had to change the length of character from say 8 to 16 in a table I had already set up and had made various Forms etc from that table. I find that after I had changed the Table to 16 that in all the forms I had carefully dervied from that Table that they were still stuck at 8, the original setting. I though this was an Object package and that this should have rippled through ? This means an awful lot of work now to go through all the forms etc. Unless there is a way to Globally refresh this ?
    Its not acceptable to make sure you have it right at the beginning since all systems need will need change and need updating due to demands.

    Walter

    #2
    RE: Table Chr length change, no refresh ?

    Walter,

    I don't recall anything in the documents which indicate that all forms, letters, reports, labels, and browses would be automatically updated when the user changes the structure of a table. Furthermore, the objects used to display table fields in forms, letters, reports, labels, and browses are not locked to the maximum width of each field in the table structure. Users are free to, and often do, display something less than the actual field width in their layouts.

    I'm afraid you've bumped into an unpleasant reality of database application development. Changes in table structures are tedious and difficult to implement in fully developed apps. Far better to spend the time on the front end to get the design right initially. (Which of course is what I say, but hardly ever do, myself!)

    -- tom

    Comment


      #3
      RE: Table Chr length change, no refresh ?

      Jim Chapman taught me a way to think about this I've found extremely useful.

      The fields on a layout (form, report, label or letter) should be thought of as windows through which we view the data. Example: you can have a field rule that transforms the capitalization of the data and changes the way it's stored in a table or you can change the form field to change the way the data is viewed regardless of how it's stored.

      Similarly, you can have a data stored in a 25 character field while choosing to show only the first 15 characters in the window. The size of the data field and the size of the window are independent.

      I know this doesn't solve the current dilema but I hope it will help in the future.

      Comment


        #4
        RE: Table Chr length change, no refresh ?

        Thanks to both replies, actually I have not done a great deal of work on the forms but I am realistically evaluating all the types of things I would do on a larger application before I do it proper. This is an important lesson !

        Walter

        Comment


          #5
          RE: Table Chr length change, no refresh ?

          this little script will tell you what forms potentially need updating after you make a change to the size of a field in a table:

          Code:
          ' detect mismatched field widths on forms
          table_list=a5.Table_Enum()
          table_list=sortsubstr(table_list,crlf())
          field_list=""
          table=""
          field=""
          
          result=ui_dlg_box("Update field width",""];
          ""> ;
          %dlg%,val(width) .or. field_decimalsval(decimals) then
          		     forms_to_fix=forms_to_fix+formname+crlf()
          		   end if
          		end if
          	   
          	end if		
          next
          f.close()
          end with
          end function
          f.close()

          Comment


            #6
            RE: Table Chr length change, no refresh ?

            Thanks for that I will apply it in the next few days, I'm impressed !
            I notice that if you change the field rules of the Table that it does refect through to the Forms.

            Walter

            Comment


              #7
              Re: Table Chr length change, no refresh ?

              Originally posted by Peter.Wayne View Post
              this little script will tell you what forms potentially need updating after you make a change to the size of a field in a table:

              Code:
              ' detect mismatched field widths on forms
              table_list=a5.Table_Enum()
              table_list=sortsubstr(table_list,crlf())
              field_list=""
              table=""
              field=""
              
              result=ui_dlg_box("Update field width",<<%dlg%
              Choose a table: [.40,10table^#table_list!table_chosen];
              {lf};
              Choose a field: [.40,10field^#field_list?table\>""];
              <*10OK?field\>""> <10Cancel>;
              %dlg%,<<%code%
              if a_dlg_button="table_chosen" then
                 field_list=table.external_field_name_get(table,"n|T|W|D")
                 ' eliminate memo, logical, and date fields from the display
                 list_to_exclude=<<%lst%
              |M|
              |Date|
              |Logical|
              %lst%
              	field_list=filter_string_multi(field_list,list_to_exclude,crlf(),.t.)
                 a_dlg_button=""
              end if
              %code%)
              if result="OK" then
                 width=word(field,3,"|")
                 decimals=word(field,4,"|")
              	table=upper(strtran(table," ","_"))  ' replace blanks in table name with underscores
              	field=upper(strtran(field," ","_"))
                 form_list=a5.form_enum(2)
                 form_count=w_count(form_list,crlf())
                 dim forms[form_count] as c
                 forms.initialize(form_list)
                 vl=local_variables()
              	forms_to_fix=""
                 for i=1 to form_count
                 		
                 		explore_form(vl,forms[i])
              		xbasic_wait_for_idle()
               	next
               	ui_msg_box("Forms needing editing",forms_to_fix)
              end if
              
              end
              
              function explore_form as v(vars as p, formname)
              with vars
              f=form.load(formname)
              
              n_children=f.children()
              for j=1 to n_children
              	o=f.child(j)  ' pointer to the object on the form
              	if o.class()="type-in field" then
              		fd=o.field_get()
              		t=fd.table_get()
              		
              		if t.name_get()=table .and. fd.name_get()=word(field,1,"|") then
              		   'ui_msg_box("found a form",formname)
              		   field_width=o.entry.width
              		   field_decimals=o.entry.dec
              			'debug(1)
              		   if field_width<>val(width) .or. field_decimals<>val(decimals) then
              		     forms_to_fix=forms_to_fix+formname+crlf()
              		   end if
              		end if
              	   
              	end if		
              next
              f.close()
              end with
              end function
              f.close()
              Most things are simple but unfortunately only after the first time

              Comment

              Working...
              X