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

Conditional Look Up on a Calculated Field

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

  • Conditional Look Up on a Calculated Field

    Hello,

    I need to create a conditional look up say if field = a or b fill this field and if field <> a or b fill that field. I set it up how it should work, but it doesnt work correctly. It only follows one of the rules. It is on a calculated field so I have to do it on the form level. The look up is in the same database.

    ex. if field = a or b fill field1 with addr if field <> a or b fill field2 with addr

    can anyone help?

  • #2
    Re: Conditional Look Up on a Calculated Field

    From the Please Read Before Posting.................

    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 table with a minimum of records (and its support files, zipped together) will make it much easier to diagnose issues with lookups, Xdialogs, etc. Screen shots of error messages are especially helpful.
    There can be only one.

    Comment


    • #3
      Re: Conditional Look Up on a Calculated Field

      There isnt really anything for me to screen shot

      I need a conditional lookup into the same table say if dt is cl or l fill buyer with buyer and if dt is not cl or l fill seller with buyer. I am not getting an error it just is not working correctly. it does one and not the other. I get this but it does not tell me anything.

      gggg.PNG

      It seems to apply which ever is first in the conditional table. I have even tried using two different tables to accomplish this but I have not been successful. The field the lookup is on, is a calculated field that is not a field in my table. I have set everything up correctly, to my knowledge. It looks like it should work but does not.

      I do not know how else to explain, I am not getting any error other than the one saying that it cannot open.


      Originally posted by Stan Mathews View Post
      From the Please Read Before Posting.................

      Comment


      • #4
        Re: Conditional Look Up on a Calculated Field

        So rather than attach a sample table for someone else to experiment with you'd rather we construct such a table, and build a form and try to imagine exactly how you have things set up.

        Good luck.
        There can be only one.

        Comment


        • #5
          Re: Conditional Look Up on a Calculated Field

          Examples we would need to poke guesses at
          What is a conditional table? Can a table conditonally be a table?
          Is it a table that is created on condtion or opened , and from where, how?
          What is a conditional lookup, where is it located, what makes it conditional, is it for a tables, browse or form button??
          Those warnings you showed explain less than nothing- you can get these from just about anywhere, you need to help us to help you.
          ex. if field = a or b fill field1 with addr if field <> a or b fill field2 with addr
          if this what you want then write a statement like that. Also explain what is it you have a problem with.
          Like this kind of - for each field that may need changing (fldA or FldB) apply a condition
          Code:
          FldA=if(checkfor="C",checkfor,fldA)
          FldB=if(checkfor="C",fldB,checkfor)
          Sounds possibly (another wild guess) that you are trying to change two fields from one statement.

          Comment


          • #6
            Re: Conditional Look Up on a Calculated Field

            I dont know how

            Originally posted by Stan Mathews View Post
            So rather than attach a sample table for someone else to experiment with you'd rather we construct such a table, and build a form and try to imagine exactly how you have things set up.

            Good luck.

            Comment


            • #7
              Re: Conditional Look Up on a Calculated Field

              It is a lookup based on conditional. I have do to it on the form level because its on a calculated field.


              condi.PNG

              tabl.PNG
              elook.PNG
              calc.PNG

              Comment


              • #8
                Re: Conditional Look Up on a Calculated Field

                I still don't get it
                BUT even so, you are likely to encounter unpredictable results if you are changing fields on a form that are set by a table level field rule.
                If this is a form that is based on a single table then zip all the files with that table name. You could try right click the file in CP and select ZIP - depending on Alpha finding that table is bound to the database
                Otherwise make a strip down version of the DB and select tools, zip and include all files.
                Reduce file sizes if large.

                Comment


                • #9
                  Re: Conditional Look Up on a Calculated Field

                  deed.zip

                  Comment


                  • #10
                    Re: Conditional Look Up on a Calculated Field

                    Alli,

                    I took a quick look. There are two forms. Which are you talking about?

                    I don't see the source table for the lookup. Did you forget to include it?

                    If you are trying to set field values in the current record, I don't understand why you would be doing a lookup to fill in values of a calculated display field.

                    Using actual field names take a couple of minutes and explain how you want this to work, as the user enters a new record, or changes an existing record.

                    You may safely assume we know nothing about your database or the purpose of the form. <grin>

                    Comment


                    • #11
                      Re: Conditional Look Up on a Calculated Field

                      I did not put the table looking up into. it is the DEEDS2 form, the field is calculated (Elook2) by what is entered. It is being entered into a new record. The calculated field needs to have a look up that will populate different fields based on what the deedtype is.

                      mari.zip is the table to lookup into.

                      Originally posted by Tom Cone Jr View Post
                      Alli,

                      I took a quick look. There are two forms. Which are you talking about?

                      I don't see the source table for the lookup. Did you forget to include it?

                      If you are trying to set field values in the current record, I don't understand why you would be doing a lookup to fill in values of a calculated display field.

                      Using actual field names take a couple of minutes and explain how you want this to work, as the user enters a new record, or changes an existing record.

                      You may safely assume we know nothing about your database or the purpose of the form. <grin>

                      Comment


                      • #12
                        Re: Conditional Look Up on a Calculated Field

                        Alli, thanks.

                        The Elook2 field is a calc display field in your form. Its value is determined by the calc expression you have defined. You cannot change this field value with an additional lookup rule . And, you should not be trying to change other fields on the form using a lookup rule defined for the Elook2 field. Instead, go to the other fields and define calc expression rules there to populate each of them based on whatever value may be found in Elook2. Does this make sense?

                        Comment


                        • #13
                          Re: Conditional Look Up on a Calculated Field

                          The calculated field needs to have a look up that will populate different fields based on what the deedtype is.

                          I can read this sentence over and over without understanding the specifics. Why is it so hard to obtain the details from you? populate what fields? with what? Don't describe the answer to these questions. Answer the questions using example field values, and explain how you want it to work, using actual field names and field values. At the moment what you write makes sense to you but only you. Can't help further without details and specifics.

                          Can you see the difference between:

                          a) Use an expression to retrieve a field value from an external table and use that value to populate a field in the current record.

                          and

                          b) I want the FIELD1 in the current record to contain the value "ABC" when FIELD2 in the current record contains "ZXY", by retrieving the value "ABC" from an external table named "myLookupSource", using an search key based on the value in FIELD2.

                          ???

                          We need (b)... all you have supplied is (a)

                          Comment


                          • #14
                            Re: Conditional Look Up on a Calculated Field

                            The elook2 field is calculated based on what is keyed into lot bookmap and page, once that is calculate I need a lookup off the elook. the elook is populated with RIGHT('0000'+ALLTRIM(STR(BOOKMAP)),4)+RIGHT('00'+ALLTRIM(STR(PAGE)),2)+ALLTRIM(LOT) . This look up will fill in the buyer and address fields with the buyer and propaddr fields from the look up. if the deedtype field is cl or l . it will fill in the seller and propaddr fields from the look up table with buyer and addr fields if the deedtype field is anything other that cl or l. The elook field matches exactly with the elook in the lookup table if not nothing gets pulled in.

                            I guess you can say im not too good at communicating.

                            Originally posted by Tom Cone Jr View Post
                            The calculated field needs to have a look up that will populate different fields based on what the deedtype is.

                            I can read this sentence over and over without understanding the specifics. Why is it so hard to obtain the details from you? populate what fields? with what? Don't describe the answer to these questions. Answer the questions using example field values, and explain how you want it to work, using actual field names and field values. At the moment what you write makes sense to you but only you. Can't help further without details and specifics.

                            Can you see the difference between:

                            a) Use an expression to retrieve a field value from an external table and use that value to populate a field in the current record.

                            and

                            b) I want the FIELD1 in the current record to contain the value "ABC" when FIELD2 in the current record contains "ZXY", by retrieving the value "ABC" from an external table named "myLookupSource", using an search key based on the value in FIELD2.

                            ???

                            We need (b)... all you have supplied is (a)

                            Comment


                            • #15
                              Re: Conditional Look Up on a Calculated Field

                              I will give this a shot

                              The elook2 field is calculated
                              =elook2 is a calc field,
                              based on what is keyed into lot bookmap and page,
                              =that is made up from from a combination of fields named lot bookmap and page,
                              once that is calculate I need a lookup off the elook. the elook is populated with RIGHT('0000'+ALLTRIM(STR(BOOKMAP)),4)+RIGHT('00'+ALLTRIM(STR(PAGE)),2)+ALLTRIM(LOT) .
                              This look up will fill in the buyer and address fields with the buyer and propaddr fields from the look up.

                              =then I need to lookupanother field, elook, made up of bookmap+page+lot (from another table?) and return a name an address that go into "buyer" and "address" fields
                              if the deedtype field is cl or l .
                              = if the type field contains either "cl"or "i"
                              it will fill in the seller and propaddr fields from the look up table with buyer and addr fields
                              =then it will fill in the seller and propaddr fields

                              Is that so far on the right track?

                              then...
                              if the deedtype field is anything other that cl or l. The elook field matches exactly with the elook in the lookup table if not nothing gets pulled in.
                              What does that mean?
                              Last edited by Ray in Capetown; 11-01-2013, 03:23 AM.

                              Comment

                              Working...
                              X