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

LookupC, LookupN cannot fill automatically

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

    #16
    Re: LookupC, LookupN cannot fill automatically

    Originally posted by CALocklin View Post
    The lookups can only work after "PID1" has been entered. I assume that just starting a new record doesn't automatically fill in PID1.
    Yes


    In that case, somebody would have to type in the value for PID1.
    I set the PID1 = "P001" as Calculate field (dont' want user to key in to reduct the human error) for the default value for LookupC and LookupN

    If that is true, you are really doing this the hard way. Instead of using this type of lookup, you should use the field rule "Table Lookup" on the PID1 field.
    I don't want to use the Table Lookup due to I have a hundred product and don't want to select a wrong product and we have problem later with wrong input.

    the concept I think when user create new record then all the default value is ready and shows at all field and then user can key just only the Start and End field only

    My concept is it possible?
    Please recommend

    Thanks

    Comment


      #17
      Re: LookupC, LookupN cannot fill automatically

      I think it's possible but I still don't understand where the value of PID1 comes from. Surely someone somewhere has to select it. If not, then it must always be the same value in every single record and that just doesn't make sense to me. My guess is that wherever that it's selected, that's where the other values should be created as well.

      I could tell you more if I knew where PID1 was coming from. However, I haven't looked at the sample you posted above - I'll do that tomorrow and maybe that will help me understand. If you already know that it's not in there, please let us know where and how the value for PID1 is determined.

      Comment


        #18
        Re: LookupC, LookupN cannot fill automatically

        I looked at your Test app this morning and the P_ID is set as a fixed default value. This doesn't make any sense to me - there might be a good reason for it but I don't understand what that would be. As I see it, if the P_ID is always going to be the same value, then they should not be stored repeatedly in the same table. [EDIT: I re-read your comments above and finally caught the fact that the values change twice a week which means the name and price would change but that still doesn't require a separate table if there is only one "item" per parent record - see next paragraph.]

        This looks like you are setting up something like an order system and this is the "line items" table. If that's the case, I suspect that you are initializing it to a default value then allowing the user to change it. When the user changes it, there will still need to be a table lookup to fill in the other values (name and price) when then new P_ID is selected. That being the case, why not just leave the initial value blank and let the user select whatever he wants? And, if there is only one 'child' record per "order" (in which case the P_ID would not have to change), why not just put it in the main "order" table? A child table that always has only one record per parent table isn't really needed and would probably just add confusion.

        If you really do need to do it the way you have it now, you will have to change the lookups to include the default P_ID value that is called out in the P_ID field. When the new record is first opened, regardless of what you enter as the default value for P_ID, the P_ID is initially blank and that's the value that your lookups in the other fields are trying to use - blank.
        Change the lookups from this:
        LOOKUPN("F", P_ID, "Price", "pd.dbf", "P_ID")
        to this:
        LOOKUPN("F", "P0003", "Price", "pd.dbf", "P_ID")

        LATER:
        I went back and tested something else that may work better for you. My assumption here is that the P_ID will most often be one value (hence the default) but occasionally the user will want to change it or add additional line items. If this is the case, you can set the default value of the P_ID just as you have but also add a table lookup to fill in the name and price. Then change the Name and TPrice fields to "User Entered" with no default value. If you do that, the Name and TPrice fields will fill in automatically to match the value in the P_ID field when a new record is started and they will also fill in automatically when the P_ID is changed. (See NY table in modified Test app attached.)

        A few other misc hints:
        - Don't use the same name for tables and sets. It works but it becomes confusing in some cases. Example - open the Forms tab in the A5 control panel and try to determine if a form attached to "NZ-Header" is in the NZ-Header table or the NZ-Header set.
        - Don't use dashes or blank spaces in table names. In some cases A5 will change these to underscores. (See my "white paper" for other naming recommendations - this one is #8. If, like others, you don't want to use my specific recommendations, that's OK, BUT at least read and try to understand the reasons so you can develop a method of your own that will solve the issues.)
        Last edited by CALocklin; 11-27-2009, 12:33 PM.

        Comment


          #19
          Re: LookupC, LookupN cannot fill automatically

          Hi Cal,

          Thank you for your quick response.
          the application I try to develop is concern about assembly line for the part list. It has 5-6 parts so why I need to set it for default and don't want user select it by himself (to reduce the human error select the wrong part)

          What you recommend me to do the below is I still have to touch some field?
          However I will try it again.

          Change the lookups from this:
          LOOKUPN("F", P_ID, "Price", "pd.dbf", "P_ID")
          to this:
          LOOKUPN("F", "P0003", "Price", "pd.dbf", "P_ID")

          Comment


            #20
            Re: LookupC, LookupN cannot fill automatically

            Check out the "LATER" section in my previous post.

            I suspect there are still some missing details about exactly what you are trying to accomplish. If you have 5-6 parts (records), then the P_ID will be different on each of those 5-6 records and setting them all to the same default value won't work. If you are creating this table from some other table (vs. the user entering each line) then we need to know exactly how you are initializing this table. If you "don't want the user to select it by himself" then it must already be selected somewhere else. Knowing where that selection is will be critical to determining how to get it transferred to this new table.

            Comment


              #21
              Re: LookupC, LookupN cannot fill automatically

              Thank you for your idea and many alternative solutions Cal.

              I have the 6 part for the default. I create set (the attached file, my sample at the first post) I create set 1:1 one for each part (my sample I do it just for 2 parts NY and NZ)

              However I will try the solution and your idea you gave.

              Thank you for you and everyone for your help and idea.
              I don't feel I'm alone and feel better to use Alpha5 and when I have problem we also have the community to discuss and share ideas with kindness people here

              Comment


                #22
                Re: LookupC, LookupN cannot fill automatically

                This is what I see as going on. ( as far as the default values not showing in your form)
                Each of your two child tables have default values being set. As individual tables they work fine. You have those two tables added to a set, each one linked 1 to 1 with the parent. You have a form based on this set. When you start a new record in that form you are only creating a new record in the parent table. It is not until you actually enter one of the fields on the form that belong to a child table that a record is started in that child table.

                It is not really any different than if you had the child tables linked 1 to many and had embedded browses on the form. You could start a new record in the parent but there would not be any child records created until you entered them in the browse.

                (as far as the over all work flow I think I am still just as confused as most of the others)
                Last edited by Tim Kiebert; 11-29-2009, 02:03 AM.
                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

                Working...
                X