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

Lookup

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

    Lookup

    Hi
    I import data from an excel spreadsheet into a database that has lookup fields. I have to run through each record double clicking on the lookup field then return to make the lookup fields work. Is there a way to make the links work automatically when I import the data.
    Thank Alan



    #2
    Originally posted by Aland View Post
    Hi
    I import data from an excel spreadsheet into a database that has lookup fields. I have to run through each record double clicking on the lookup field then return to make the lookup fields work. Is there a way to make the links work automatically when I import the data.
    Thank Alan

    So translating your phrase... means a field needs to be filled with data from the table that is looked up?

    Import doesn't do that and the lookup field rule is a user driven process, so it only fills when the user interface is used.

    You can use an update operation to fill the data into a field by defining a set that links the tables together and then updates the field from the linked table if it's value is blank.

    Or is there something else going on?
    Al Buchholz
    Bookwood Systems, LTD
    Weekly QReportBuilder Webinars Thursday 1 pm CST

    Occam's Razor - KISS
    Normalize till it hurts - De-normalize till it works.
    Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
    When we triage a problem it is much easier to read sample systems than to read a mind.
    "Make it as simple as possible, but not simpler."
    Albert Einstein

    http://www.iadn.com/images/media/iadn_member.png

    Comment


      #3
      I was about to ask a similar question, but the server wouldn't respond, so,
      What would you like have happen?
      See our Hybrid Option here;
      https://hybridapps.example-software.com/


      Giving advice is dangerous.
      Giving "Good Advice" can be fatal.

      Comment


        #4
        Hi Thanks for your help.
        Have created the set but cannot see how the update operation works.
        On the imported data I have an employee number, (I used to type in all the records) as you said the lookup for their charge rate does not work unless i put the employee number in again.
        I want to have the charge rate field updated without having to go through each record again.
        Alan

        Comment


          #5
          Aland, most of the field rules in the table being populated by the import won't "fire" unless you're entering records through a form based on that table.  I believe there are exceptions to that for autoinc and calc field rules. Give the specifics on the lookup you've defined. Tell us about the lookup source. Tell us about the link key value used to identify the record containing the desired field value.

          Comment


            #6
            Originally posted by Tom Cone Jr View Post
            Aland, most of the field rules in the table being populated by the import won't "fire" unless you're entering records through a form based on that table.� I believe there are exceptions to that for autoinc and calc field rules. Give the specifics on the lookup you've defined. Tell us about the lookup source. Tell us about the link key value used to identify the record containing the desired field value.
            Tom

            Aland's 4:22 am (at least on my time zone) post went through an approval process for some reason.

            Looks like we need an operation tutorial here.

            Do you have one handy? I'm underwater for awhile here..
            Al Buchholz
            Bookwood Systems, LTD
            Weekly QReportBuilder Webinars Thursday 1 pm CST

            Occam's Razor - KISS
            Normalize till it hurts - De-normalize till it works.
            Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
            When we triage a problem it is much easier to read sample systems than to read a mind.
            "Make it as simple as possible, but not simpler."
            Albert Einstein

            http://www.iadn.com/images/media/iadn_member.png

            Comment


              #7
              I get the total cost of a project from a database called projectcost. It has an employee number field which is linked by lookup to a staff database which has the information about the employee including a field giving their charge rate.
              I import the employee number and hours worked on a project but as previously stated the lookup for the charge rate does not work unless I overtype the employee number.
              I was hoping to automate this so I did not have to overtype the employee number on a large number of records every month.
              Thanks
              Alan

              Comment


                #8
                Originally posted by Aland View Post
                I get the total cost of a project from a database called projectcost. It has an employee number field which is linked by lookup to a staff database which has the information about the employee including a field giving their charge rate.
                I import the employee number and hours worked on a project but as previously stated the lookup for the charge rate does not work unless I overtype the employee number.
                I was hoping to automate this so I did not have to overtype the employee number on a large number of records every month.
                Thanks
                Alan
                Got it.

                Sets and operations are very powerful and you should get familiar with them.

                Open the control panel - Tables/Sets - right click the set that links projectcost with staff linked by employee number - select Create Operation

                select Update records - press the create button

                In the field column id the rate field in projectcost
                in the Expression column id the rate field in staff

                On the toolbar click the Select Records button - Choose Specify record selection criteria - Records selected by a filter expression - enter the appropriate filter to get the records that need updating.

                Save the operation with a name.

                Run this operation after you import the data.

                You can script this. Build a script that runs the import, then runs the update.
                I highly suggest that you convert the action script to xbasic and run as an xbasic script or make each operation a function and script those in sequence (preferred).

                For now just run the operations individually.

                Windows/Alpha tends to run action scripts as multi threaded steps which may cause step 2 to run before step 1 is finished. Very messy, Functions eliminate that issue.

                Al Buchholz
                Bookwood Systems, LTD
                Weekly QReportBuilder Webinars Thursday 1 pm CST

                Occam's Razor - KISS
                Normalize till it hurts - De-normalize till it works.
                Advice offered and questions asked in the spirit of learning how to fish is better than someone giving you a fish.
                When we triage a problem it is much easier to read sample systems than to read a mind.
                "Make it as simple as possible, but not simpler."
                Albert Einstein

                http://www.iadn.com/images/media/iadn_member.png

                Comment


                  #9
                  Al
                  Thanks for this, I was able to follow your instruction and it works.
                  Thanks again.
                  AlanD

                  Comment


                    #10
                    There's ALWAYS a way.
                    Been ducking and diving with Alpha for years.
                    Al is much younger and better looking than me. Maybe. So he is on the ball.

                    I haven't found many situations where the Alpha DT developers have not covered the eventualities, however sometimes brain overload hits the wall.
                    It's not always easy, but like Al, a few of us have hit the buffers and asked for help.
                    In fact I have an issue at the momen I'm arm wrestling and may need help with.

                    This is one of 2 really good help forums, but it needs a question and a few grey hairs to answer them.
                    Glad you got it working.
                    See our Hybrid Option here;
                    https://hybridapps.example-software.com/


                    Giving advice is dangerous.
                    Giving "Good Advice" can be fatal.

                    Comment


                      #11
                      I used to fight using sql because it was new and I wasn't building anything for masses. Then I learned sql and discovered Alpha goes out of it's way to work with sql.
                      This ability to use joins and view with the ability to import the results really make sql much more accommodating then you might think, plus your data would then be
                      in place for when you want to jump into web projects.
                      Don't let the unknown deter you, getting data from dbf tables into sql tables is an export and import for each dbf table.
                      Code:
                      -- this sql provides totals group by project / staff member. 
                      select p.project, sum(p.materials) `materials`, sum(p.hours * s.chargerate) `labor`, sum( sum(p.materials) + sum(p.hours * s.chargerate) ) `subtotal`
                      from project p
                      left join staff s on s.seq = p.staffpk
                      where p.projectid = :projectid
                      group by p.projectid, s.staffpk
                      Gregg
                      https://paiza.io is a great site to test and share sql code

                      Comment


                        #12
                        Aland, be careful with update operations. I recommend making a good backup before running a new update operation for the first time. They are brutally efficient and relentless. Can cause much unexpected damage if not used carefully. Very hard to "reverse" the update if it does something you're not expecting. -- tom

                        Comment

                        Working...
                        X