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

Form.ViewLinked()?

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

    #16
    Re: Form.ViewLinked()?

    Hi Lance,

    OK, I now saved the child record and you are right, although the link field is not filled at that point, it is saved in the record.

    As it was picking up the value and displaying the link if a child existed, I assumed that it would do the same for a new Invoice without any existing child records. As Tim has mentioned this works that way in V8.

    I need my user to see the Link value on the second form as a visual confirmation that they are working on the same Invoice. I had set the field as read only, so there would not be an issue with damage to the link.

    I shall have to do some work arounds with variables to get the display needed.

    I shall still report it.
    Regards
    Keith Hubert
    Alpha Guild Member
    London.
    KHDB Management Systems
    Skype = keith.hubert


    For your day-to-day Needs, you Need an Alpha Database!

    Comment


      #17
      Re: Form.ViewLinked()?

      Keith/Mike,

      I agree this is a bug as it is different now and should be reported.

      If you your own auto increment field (for sorting the browse) as has been discussed in several other threads, you get very strange results as the increment is usually based on the last value in the linked fields record, which is blank until saved!!

      Comment


        #18
        Re: Form.ViewLinked()?

        Lance,

        Ahh duhh. :) I did not continue further with the test than just starting the new record. Thanks for setting us straight. I agree that normally one would not need to see the linking field and once development was done I would probably not include it on the form. But sometimes as in Keith's case the user does want to see it just for confirmation. I have not developed new uses of the function as of late but I too would have thought something was amiss when the link did not show up because the behaviour is definately different.

        As far as the user being able to alter the value in the linking field.... the viewLinked() function seems to automatically disable editing in any fields used in the link definition.
        Tim Kiebert
        Eagle Creek Citrus
        A complex system that does not work is invariably found to have evolved from a simpler system that worked just fine.

        Comment


          #19
          Re: Form.ViewLinked()?

          Good spot Tim, hadn't tried to change the linked value. That is a good feature.

          While we are all talking about Alphasports, has anyone ever pointed out to the powers that be that the code on the Invoice toolbar 'New Invoice' button is not correct, if you are in the browse this adds a new record to the invoice items table, the code should be
          Code:
          topparent.new_record()

          Comment


            #20
            Re: Form.ViewLinked()?

            OK, while we are on the subject, I cant get the current child record that has focus to be the record in the child form to edit. It is only picking up the first child record.

            What is the syntax to pick up the current child record that has focus from the browse to edit? I guess this would be for the filter?
            Last edited by Keith Hubert; 05-17-2009, 03:33 AM.
            Regards
            Keith Hubert
            Alpha Guild Member
            London.
            KHDB Management Systems
            Skype = keith.hubert


            For your day-to-day Needs, you Need an Alpha Database!

            Comment


              #21
              Re: Form.ViewLinked()?

              I would use a5_open_EmbeddedBrowse_CompanionForm() for that Keith.

              Comment


                #22
                Re: Form.ViewLinked()?

                Lance,

                Anything on a5_open_EmbeddedBrowse_CompanionForm() in help file?
                Last edited by Keith Hubert; 05-17-2009, 06:49 AM.
                Regards
                Keith Hubert
                Alpha Guild Member
                London.
                KHDB Management Systems
                Skype = keith.hubert


                For your day-to-day Needs, you Need an Alpha Database!

                Comment


                  #23
                  Re: Form.ViewLinked()?

                  Hi Keith,

                  There is an action script for this, it was brought in in version 8. The unhelpful to find what's new in version 8 file contains the following
                  A5_open_EmbeddedBrowse_CompanionForm() Function - This function is designed to be used in a button or an event on a form that is based on a set with one-to-many child tables. It opens a pop-up form to edit the current record in an embedded browse, or to add a new record to the table whose records are shown in an embedded browse. While it has always been possible to write the Xbasic code to do this, this function simplifies the process by automatically performing the resynchronization necessary to cause the embedded browse to correctly display the edits that were made in the pop-up form. A new action in Action Scripting has been added to automate calling this function.
                  The syntax for the function is:
                  a5_open_EmbeddedBrowse_CompanionForm() as p (mode as c, targetFormName as c, formPointer as p, browseName as c, targetTablePrimaryKey = "Recno()", linkDef = "", otherOptions = null_value())

                  Where:
                  Mode "Edit" or "Add" - indicates if you want to edit the current record in the embedded browse, or add a new record
                  targetFormName Name of the form to open to edit the records. formPointer A pointer to the form whose records you want to edit. If this function is called from an event on the form whose records you want to edit, then you can specify 'topparent.this' to get a pointer to the current form. browseName The object name of the embedded browse whose records you want to edit. targetTablePrimaryKey If the Mode is set to 'edit', you need to indicate a primary key expression for the target table (the table whose records you will be editing). This allows Alpha Five to find the correct record to show in the pop-up form. The default value for this argument is 'recno()'. If you are editing data in local .dbf tables, then the default value for this argument should be sufficient. However, you could also specify any expression that uniquely identifies a record in the target table. E.g. 'invoice_number'. linkDef This optional argument defines the link between the target table (the table whose records you will be editing) and its parent table. The default value for this argument is blank. If it is blank, then Alpha Five will automatically determine the link definition from the definition of the set on which the form is based. However, if the set definition links the target table and its parent table on an expression, rather than on matching field names, you will need to specify a link definition. The link definition tells Alpha Five what values to put into the linking fields in the target table when a new record is created. Without this information, the new record would not be properly linked to its parent record. The format for the linkDef parameter is a CR-LF delimited list of this form: targetTableFieldName = parentTableFieldName otherOptions A optional dot variable that specifies additional optional properties. These are:otherOptions.X_position - x co-ordinate of the pop-up form. Can be 'left', 'center', 'right' or an absolute position in pixels.
                  otherOptions.Y_position - y co-ordinate of the pop-up form. Can be 'top', 'center', 'bottom' or an absolute position in pixels.
                  otherOptions.RestrictNavigation - (defaults to .t.) - Indicates if the user can navigate to other records when the pop
                  Example:
                  a5_open_embeddedBrowse_companionForm("edit","editLineItems",topparent.this,"browse1")

                  This will open a form called 'editLineItems' to edit the current record shown in the embedded browse called 'browse1'. The 3rd argument, 'topparent.this' is just a pointer to the current form.
                  Sorry, couldn't get that to format very well, open the link above and search for second occurrence of companion for a better layout. Good luck.

                  Comment


                    #24
                    Re: Form.ViewLinked()?

                    Lance,

                    Many thanks for Help info.

                    Hope I can make this work, watch this space!!
                    Regards
                    Keith Hubert
                    Alpha Guild Member
                    London.
                    KHDB Management Systems
                    Skype = keith.hubert


                    For your day-to-day Needs, you Need an Alpha Database!

                    Comment


                      #25
                      Re: Form.ViewLinked()?

                      Just an update, the Action Script open_EmbeddedBrowse_CompanionForm does both jobs of entering a new record and editing an existing record.

                      Not quite sure of the difference to Form.ViewLinked()? Either way the linking field does not get displayed in V9 as it does in V8.
                      Regards
                      Keith Hubert
                      Alpha Guild Member
                      London.
                      KHDB Management Systems
                      Skype = keith.hubert


                      For your day-to-day Needs, you Need an Alpha Database!

                      Comment


                        #26
                        Re: Form.ViewLinked()?

                        News Update:

                        Bug reported and confirmed as such and will be fixed ASAP.

                        Thanks Selwyn.
                        Regards
                        Keith Hubert
                        Alpha Guild Member
                        London.
                        KHDB Management Systems
                        Skype = keith.hubert


                        For your day-to-day Needs, you Need an Alpha Database!

                        Comment


                          #27
                          Re: Form.ViewLinked()?

                          Hi Keith,

                          Have you had any news on the BUG fix, there have been a few others reported and confirmed as bugs since the last fix way back in March.

                          Do you think we have to wait till version 10 to get some correctly running software!

                          Comment


                            #28
                            Re: Form.ViewLinked()?

                            Hi Lance,

                            All I can tell you is that this has been fixed and will be in the next patch.
                            Regards
                            Keith Hubert
                            Alpha Guild Member
                            London.
                            KHDB Management Systems
                            Skype = keith.hubert


                            For your day-to-day Needs, you Need an Alpha Database!

                            Comment

                            Working...
                            X