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

Display an image based on the on the contents of a database field.

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

    #16
    Re: Display an image based on the on the contents of a database field.

    Thanks Tom .. now to digest it .. Don

    Comment


      #17
      Re: Display an image based on the on the contents of a database field.

      Nice example Tom
      I cant see how one could use that technique for a number of records in one view - say browse or report?
      Do you have any ideas?

      Comment


        #18
        Re: Display an image based on the on the contents of a database field.

        Ray,
        Never had the need, but I'll think about it...

        Comment


          #19
          Re: Display an image based on the on the contents of a database field.

          Ray, for a browse how about an on_click or on_doubleclick event that would pop up a dialog with the image?

          We do something similar with an on_fetch event when we need to identify a client immediately. Under certain circumstances, the image is popped up with a message for the front desk clerks so they can notify the caseworkers.
          The code is somewhat sloppy, but it accomplishes its purpose.
          Code:
          		dim pict1 as C
          		pict1 = ""
          		if .not.exist(tbl1.SSN,"G:\CASEREG\image.dbf","ssn") then
          			'ui_msg_box(trim(aa.bcbss.agency)+" Client Information System","No Image Record exists for this Client")
          			UI_MSG_BOX(aa.bcbss.agency+" - WARNING!!!!","ONLY interview on 1st Floor!!!"+chr(13)+chr(13)+"See CASE Folder for Details",16)
          			end
          		  else
          		  	tbl2 = table.open("G:\CASEREG\image.dbf")
          			tbl2.index_primary_put("ssn")
          			tbl2.fetch_find(tbl1.ssn)
          			if upper(tbl2.Alt_payee)="X"
          				name1 = upper(trim(tbl2.alt_fname)+" "+trim(tbl2.alt_lname))+" - Auth Rep"
          	 		  else
          	 		  	name1 = upper(trim(tbl1.fname)+" "+trim(tbl1.lname))
          			end if
          			pict1 = tbl2.image
          			tbl2.close()
          		end if
          		'pict1 = lookupc("F",client->SSN,"image","image.dbf","ssn")
          		if pict1 <>""
          			oldfile = "G:\IMAGES"+chr(92)+trim(pict1)+".jpg"
          			if .not. file.exists(oldfile)
          				UI_MSG_BOX(aa.bcbss.agency+" - WARNING!!!!","ONLY interview on 1st Floor!!!"+chr(13)+chr(13)+"See CASE Folder for Details",16)
          				end
          			end if
          		  else
          			UI_MSG_BOX(aa.bcbss.agency+" - WARNING!!!!","ONLY interview on 1st Floor!!!"+chr(13)+chr(13)+"See CASE Folder for Details",16)
          			end
          		end if
          		'new code for xdialog inserted here
          		f = file.open(oldfile,FILE_RO_SHARED)
          		ui_bitmap_load("temp",f.readb(10000000))
          		f.close()
          		Dim msg1 as C = " - WARNING - ONLY interview on 1st Floor!!!"
          		dim msg2 as C = "See CASE Folder for Details"
          		ui_dlg_box(name1,<<%dlg%
          		
          		{lf};
          		{justify=center}
          		{font=arial,12,b}{color=Red on Gray}{text=70,msg1};
          		{image=temp}; 
          		{lf};
          		{text=50,msg2}{Color=Black on Gray}{font=arial,8,n}
          		{lf};
          		<*15&Close>
          		%dlg%)
          		ui_bitmap_drop("temp")
          		delete msg1
          		delete msg2
          		delete name1
          For a report, I'll think about it.

          Tom
          Last edited by Tom Henkel; November 20, 2013, 09:31 AM. Reason: added code

          Comment


            #20
            Re: Display an image based on the on the contents of a database field.

            Thanks Tom
            I was asked to quote for something that will work like a microfiche - remember that screen at the motor dealer where they would insert a slide to pull up the pictorial explosion of your car engine or door, showing the exploded diagram of components?
            We want here to call up the model of say a domestic washing machine listing the components but each with a picture so the customer can point to the correct part that he needs to replace.

            Comment


              #21
              Re: Display an image based on the on the contents of a database field.

              Ray,

              I just put code into an on_doubleclick event for our employee browse. It searches out the employee photo ID based on their employee number, then it builds an xdialog that will show the employee.

              For your parts breakdown, you could use the same idea; show the part # and description in the browse, then when the customer thinks they have the right one, double click and see if it is correct.

              resultant screen attached. (pardon the picture, its me...) doubleclick.jpg
              Code:
              Code:
              dim name1 as C = ""
              tc = table.current()
              name1 = trim(tc.wname)
              G_EMP = table.open("g:\bcbss\employee\g_employ.dbf",FILE_RO_SHARED)
              g_emp.index_primary_put("Emp_ID")
              found = G_EMP.fetch_find(tc.Emp_ID)
              if found >0
              	badgeno = G_EMP.badge_no
              	dim Shared pict AS C
              	dim bmpfile as C
              	pict = alltrim(str(badgeno,9,0))
              	bmpfile = "g:\bcbss\photo"+chr(92)+trim(pict)+".jpg"
              		
              	if .not.file_exists(bmpfile) then
              		bmpfile = "g:\bcbss\photo"+chr(92)+"not_avail.jpg"
              	end if
                else
                	bmpfile = "g:\bcbss\photo"+chr(92)+"not_avail.jpg"
              end if
              g_emp.close()
              'bmpfile = lookupc("F",client->SSN,"image","image.dbf","ssn")
              
              		'new code for xdialog inserted here
              		f = file.open(bmpfile,FILE_RO_SHARED)
              		ui_bitmap_load("temp",f.readb(10000000))
              		f.close()
              		Dim msg1 as C = name1
              		dim msg2 as C = "~~~~~~~~~~~~~~~~~~~"
              		ui_dlg_box("EMPLOYEE PHOTO",<<%dlg%
              		
              		{lf};
              		{justify=center}
              		{font=arial,12,b}{color=Red on Gray}{text=70,msg1};
              		{image=temp}; 
              		{lf};
              		{text=20,msg2}{Color=Black on Gray}{font=arial,8,n}
              		{lf};
              		<*15&Close>
              		%dlg%)
              		ui_bitmap_drop("temp")
              end 
              delete bmpfile
              delete name1
              delete pict
              delete badgeno

              Comment


                #22
                Re: Display an image based on the on the contents of a database field.

                Good one
                Actually yes I can see it work.
                In the header - a picture of the machine AND a picture of all components laid out in relative position as they fit together inside the machine.
                They will appear very small but identifiable. The double click on the row will show a clearer picture of the part (better than if every row has a small picture).
                Thanks for all the effort Tom IOU1

                Comment


                  #23
                  Re: Display an image based on the on the contents of a database field.

                  Ray, this idea could be built using hotspots. Just something to consider - good luck sounds like a really cool project
                  NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

                  Comment


                    #24
                    Re: Display an image based on the on the contents of a database field.

                    Mmmm?
                    An imaginarium
                    Or a rollover
                    Probably Toms idea with button on each row instead of double click.

                    Comment


                      #25
                      Re: Display an image based on the on the contents of a database field.

                      Yes, an imaginarium - I like it.
                      I found this You-Tube video which is a good tutorial for when you (or anyone for that matter) gets stuck in alpha5
                      Programmers Guide to Decision Making
                      NWCOPRO: Nuisance Wildlife Control Software My Application: http://www.nwcopro.com "Without forgetting, we would have no memory at all...now what was I saying?"

                      Comment

                      Working...
                      X