Very Hot Topic (More than 25 Replies) Using Sesame for a document database (Read 8387 times)
StreifLicht
Member
*
Offline



Posts: 17
Joined: Mar 15th, 2013
Using Sesame for a document database
Mar 16th, 2013 at 9:32am
Print Post Print Post  
I am quiet new to Sesame and currently testing Sesame.
I would like to build a document databsase and therefore
I neet a field to store a file.
I have found already a field for storing pictures so i can
Store a small preview of the document. But a field for
storing a pdf-document i am missing.
Maybe some of the experts could give me a hint for that.
Thanks in advance.
  
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Using Sesame for a document database
Reply #1 - Mar 16th, 2013 at 6:31pm
Print Post Print Post  
By no means I am an expert, but responding to let you know that Sesame can handle document management system very well. I know because I have one and that handles various documents, .pdf, doc, docx, jpg, xls, etc., for all my more than three thousands active clients. I also have document management system in my personal organizer system.

In my system, Documents is a subform in tableview, meaning it is a subdatabase. A document can be opened up using Asynchshell ( ) command on element entry event in one of the tableview elements.  Sesame does not have the field that could display pdf file but it will be displayed in pdf reader or Adobe Acrobat or any other program associated with pdf file in your pc. The same is applicable to other documents file such as doc or xls. The document can be scanned in directly (I use TwainSave program) or picked up from email or anywhere in your file manager of PC. Description that you enter will be used to locate it by search parameters and unique filename is generated by the programming. My documents are in the cloud and they automatically synch to network pc at home or office. The documents are available to me also on the road using Teamviewer with my cellphone or tablet. 

Since you are testing the program, I thought it is not inappropriate to point out the awesome power of Sesame that a non-programmer like me can harness!! Once you will start using the program and put a few codes here and there, you will start feeling confident and see what more you can do with Sesame. Your greatest asset while learning will be this forum. Just place a query here and you will be surprised that how many people are out there, eager to help you. Good Luck.
  
Back to top
 
IP Logged
 
StreifLicht
Member
*
Offline



Posts: 17
Joined: Mar 15th, 2013
Re: Using Sesame for a document database
Reply #2 - Mar 16th, 2013 at 9:21pm
Print Post Print Post  
Thank you very much for this positive answer. So i will go further investigating the features of Sesame.
I am currently working with the Quick_Start_Tutorial.

Could it be that the preview mode has changed a little bit from version 2.0 to the actual version 2.5 ?

In the Turorial is described a preview mode like shown on attachment 1, but on the screen it looks like this (attachment 2). I send attachment 2 in another post, because i am alowed attaching only one attachment.
  

Sesame_Tut1.png ( 192 KB | 73 Downloads )
Sesame_Tut1.png
Back to top
 
IP Logged
 
StreifLicht
Member
*
Offline



Posts: 17
Joined: Mar 15th, 2013
Re: Using Sesame for a document database
Reply #3 - Mar 16th, 2013 at 9:23pm
Print Post Print Post  
Here's attachment 2. The preview mode on my screen looks like this:
  

Sesame_Prg1.png ( 24 KB | 81 Downloads )
Sesame_Prg1.png
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Using Sesame for a document database
Reply #4 - Mar 17th, 2013 at 2:46am
Print Post Print Post  
If you see, the Label Color properties of elements and background color properties of both the forms are not the same. And the difference in look is because of that and not due to different versions.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Using Sesame for a document database
Reply #5 - Mar 17th, 2013 at 3:41am
Print Post Print Post  
Tree view versus button view menus?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
StreifLicht
Member
*
Offline



Posts: 17
Joined: Mar 15th, 2013
Re: Using Sesame for a document database
Reply #6 - Mar 17th, 2013 at 10:56am
Print Post Print Post  
Quote:
Tree view versus button view menus?

Yes, the button menu on the left side (with the essential commands). It works but its different to the tutorial. Therefore i am asking...
The different colors of the form are present because i played a bit with the property editor.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Using Sesame for a document database
Reply #7 - Mar 17th, 2013 at 2:03pm
Print Post Print Post  
Yes, the default menu changed between versions 2.0 and 2.5. You can, however, switch between them and use whichever you prefer. The button menu is simpler and initially easier to use. The tree menu is more complex and powerful. There are entries in the file sesame.ini that control much of the user interface:

https://www.lantica.com/support/kb/article/000217
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
StreifLicht
Member
*
Offline



Posts: 17
Joined: Mar 15th, 2013
Re: Using Sesame for a document database
Reply #8 - Mar 18th, 2013 at 9:15pm
Print Post Print Post  
I will try it with the button menus. Just to know, that it is now in v2.5 different is ok for me. Thank you!
  
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Using Sesame for a document database
Reply #9 - Mar 18th, 2013 at 9:52pm
Print Post Print Post  
Since you are making Document database, you probably will have to work with scanner for atleast some of the documents. Following thread will get you thinking...

http://lantica.com/Forum4/cgi-bin/yabb2/YaBB.pl?num=1302811064/5#5
  
Back to top
 
IP Logged
 
StreifLicht
Member
*
Offline



Posts: 17
Joined: Mar 15th, 2013
Re: Using Sesame for a document database
Reply #10 - Mar 23rd, 2013 at 10:18pm
Print Post Print Post  
Thank you again for the hint.
Today i order a copy of Sesame v2.
For starting i need to add a pdf document to the database. For one dataset i would like to have some fields and the possibility to add the documents.
What is the common case - do Sesame save the links to the document or do Sesame save the document within its database?
One case could be, that i have a folder with pdf documents and select the desited document with a "file open" or "select file" command". Currently i don't know how to start.
Maybe i should finish the tutorial first...
But i would like to test the "document field" as soon as possible  Wink
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Using Sesame for a document database
Reply #11 - Mar 23rd, 2013 at 10:56pm
Print Post Print Post  
Sesame can store the document internally (by translation in base-64),  but I strongly recommend that you simply store the path to the document. Storing it internally is very space consumming and doesn't really have any benefit other than making it easier to move the application from one computer to another, which can otherwise be easily programmed.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Using Sesame for a document database
Reply #12 - Mar 24th, 2013 at 12:10am
Print Post Print Post  
StreifLicht, how many maximum documents would you have in a record?  Please read up on @AsynchShell ( ) command. You can also read up of a related commands such as @Shell ( ).
  
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Using Sesame for a document database
Reply #13 - Mar 24th, 2013 at 1:04am
Print Post Print Post  
Quote:
Sesame can store the document internally (by translation in base-64)

Mark, just wondering how that is done? Do we need to use converter and encoder?  I have been using  storing the path method and avoid having a bloated application. But still wondering, how is it stored internally? I am wondering if anyone of the users is using the base-64 internal storage method?
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Using Sesame for a document database
Reply #14 - Mar 24th, 2013 at 5:52am
Print Post Print Post  
Yah, you need a base-64 encoder and decoder. Sesame has one built in, but it isn't exposed in Sesame 2. Basically, base-64 is one of many encodings that allow binary data, like a PDF file, to be stored as ASCII strings. There are many free encoders and decoders for base-64. It is the common transmission format for binary images displayed on web pages and email readers. Sesame also uses it when transmitting binary images.

Sesame 3 has several other ways to store binary data, somewhat more directly. But, in general, it is wiser and more efficient to store large binaries in the file-system, rather than in any database. There isn't any direct way to search large binaries from a form, or even display any and all binary formats that can be indexed. So, you end up having to write them to temporary files just to display them anyways, especially on Windows. And, they do cause a lot of useless bloat.

It is better to derive keywords or other information from the binary and store those along with the path to the binary in a database. Then use you favorite viewer for whatever binary format you are dealing with.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
StreifLicht
Member
*
Offline



Posts: 17
Joined: Mar 15th, 2013
Re: Using Sesame for a document database
Reply #15 - Mar 25th, 2013 at 8:18pm
Print Post Print Post  
@Bharat_Naik
I plan to have 1-9 documents within one dataset.
Also i plan to store all documents in a subfolder of my database files and use the "document link feature"
  
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Using Sesame for a document database
Reply #16 - Mar 25th, 2013 at 8:29pm
Print Post Print Post  
In that case you are better of making a subform for Documents database and you can have as many document paths stored as needed, no limits!! It is a good idea to have Document folder under "C:\Sesame2\". So you will store all your documents in c:\sesame2\documents folder.
  
Back to top
 
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Using Sesame for a document database
Reply #17 - Mar 25th, 2013 at 9:20pm
Print Post Print Post  
StreifLicht,

I do not want to confuse and complicate the process you are following, however I thought I would give you something else to think about once you are comfortable with Sesame.

Very soon you will learn that Sesame is not only easy to use but super powerful and will allow you to do most anything you desire.

I have a similar application to what you describe. I store documents on a shared drive and have the sesame application name the document and then place it on that drive. One of the problems my users had was on some records not all the documents were present so they never knew when pressing a button to view if something was there.

Below is a small snippet of code as an example that when entering a client record it looks to see what docs are available, turns a checkbox green or red and makes a command button either visible or not based on if a document is present.

This way the user knows instantly what is available.

I am not sure of the type of documents you are dealing with, however if they are PDf's the people on this board helped me find a method that automatically adds docs to existing types of PDF's so if you add more docs of the same specific type (say additional letters they sent) it just appends the existing pdf.

When and if you need any of these features just ask and we can post up the sbasic snippits.   

Enjoy Sesame its a great product!

Subroutine TA_docYN() // checks and updates presence of docs
// This checks to see if the completed employee docs form is in the directory and puts a check mark in field element YNEP      
iF      FileExists("s:\EP\" +TA_id+"EP.pdf") // needs to be changed based on working directory
     
     {
                 YNEP = 1
           RGBColor(YNEP,-1,-1,-1,0,255,0)
           Visibility(ButtonVEP, 1)      
           Forceredraw()
           //writeln("Green")      
           
     

     }
     else
     {
     

           YNEP = 0
           RGBColor(YNEP,-1,-1,-1,255,0,0)
           Visibility(ButtonVEP, 0)
           Forceredraw()
           //writeln("Red")            
     }



// This checks to see if the correspondence docs form is in the directory and puts a check mark in field element YNCOR      
iF      FileExists("s:\COR\" +TA_id+"COR.pdf") // needs to be changed based on working directory
     
     {
     
     
           YNCOR = 1
           RGBColor(YNCOR,-1,-1,-1,0,255,0)
           Visibility(ButtonVCOR, 1)      
           Forceredraw()
           //writeln("Green")      
           
     

     }
     else
     {
     

           YNCOR = 0
           RGBColor(YNCOR,-1,-1,-1,255,0,0)
           Visibility(ButtonVCOR, 0)
           Forceredraw()
           //writeln("Red")            
     }


End Subroutine
  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
StreifLicht
Member
*
Offline



Posts: 17
Joined: Mar 15th, 2013
Re: Using Sesame for a document database
Reply #18 - Mar 28th, 2013 at 11:10pm
Print Post Print Post  
Have done the tutorial now.
I would like to try using a document database and displaying it in a subform of my main database which contain "buying parts".
Therefore, my first step should be the document database.
I have attached a screenshot to show what i want to do.
I would like to add a shortname, a description and then add a file to the dataset. There should be a button "select file" then a file dialog should open. Preset to my document folder c:\sesame2\documents. Then i select the file and the file name is displayed in the field.
Much better would be the possibility to select an other directory - selecting the file, and then the file is being copied to the c:\sesame2\documents directory and then is displayed in the field.

  

Ducument1.png ( 11 KB | 82 Downloads )
Ducument1.png
Back to top
 
IP Logged
 
BOBSCOTT
Senior Member
Members
*****
Offline


That Darn Computer #$X#
{curse words}

Posts: 1195
Joined: Nov 22nd, 2002
Re: Using Sesame for a document database
Reply #19 - Mar 29th, 2013 at 12:27am
Print Post Print Post  
If I understand correctly you want to press a button and make a document part of the record.

What I do is to pop up a selection box for a user to select the type of document they are wanting to attach to the record.

I then have Sesame present a dialog box to select the file. (mine opens in c:\attach)

I then have sbasic rename the file so it is associated to the record and then place the file in the proper directory for access by any user who is allowed.

The code I presented earlier in this thread is then used to notify the user in the future if the record they enter has available documents and the view button is then used to instantly access the document.

I know my code is not the best written and there are so many different ways to accomplish the same goals with sesame, however the code below can be used as an example of how to do this and get you thinking and going in the correct direction.

I added comments to try and help you understand what is going on in the code.

// Declaring my variables
var Vresult as string
Var m as int
Var n as int
Var s as int
Var D as int
var Vrname as string
var Vshow as string


var vResult1 as string
var vChoices as string
var vDocType as string

var vDir as string
var vDirNfile as string
var vview as string


     vDocType = ""
// These are the choices the users will see in the pop up to select type of doccument
     vChoices = "Script;" +
     "Medical Documentation;" +
     "Insurance Docs;" +
     "Hst Recieved Doc;" +
     "HST Sent Back Doc;" +
     "HST Questionnaire;" +
     "HST Study;" +
     "HST Study 2;" +
     "HST Study 3;" +
     "Interp 1;" +
     "Interp 2;" +
     "Interp 3;" +
     "Signed Super Bill 1;" +
     "Signed Super Bill 2;" +
     "Signed Super Bill 3"

//  this is setting where to display the pop up on my screen In this example I want it to pop up near my element called status
     PopupSelectPosition(4, @XPos(status), @YPos(status))

// This is running the pop up for the document type
     vResult1 = @PopupChoiceList(vChoices, "Select A Document Type to upload")

     if vResult1 = ""

     {
           @Msgbox("","No Document type Selected","")


     }
     
else

     {


           vDocType = vResult1
           //Writeln(vResult1)
     
                 if vDocType = "Script"

                       {
                             vDocType = "script"
                             vDir = "sesame\script\done\"
                       }

     else
                       
                 if vDocType = "Signed Super Bill 1"

                       {
                             vDocType = "sb1"
                             vDir = "sb1\"
                       }

     else

                       

                 if vDocType = "Signed Super Bill 2"      

                       {
                             vDocType = "sb2"
                             vDir = "SB2\"
                       }

     else
     
                 if vDocType = "Signed Super Bill 3"
     
                       {
                             vDocType = "sb3"
                             vDir = "SB3\"
                       }

     else
     
                 if vDocType = "Medical Documentation"

                       {
                             vDocType = "MedDoc"
                             vDir = "MedDoc\"
                       }

     else

     
                 if vDocType = "Insurance Docs"

                       {
                             vDocType = "InsDoc"
                             vDir = "InsDoc\"
                       }

     else
     

                 if vDocType = "HST STudy"
                 
                       {

                             vDocType = "HSTStudy"
                             vDir = "HSTStudy\"
                       }
     else
     

                 if vDocType = "HST STudy 2"
                 
                       {

                             vDocType = "HSTStudy2"
                             vDir = "HSTStudy2\"
                       }


     else
     

                 if vDocType = "HST STudy 3"
                 
                       {

                             vDocType = "HSTStudy3"
                             vDir = "HSTStudy3\"
                       }


     else
     

                 if vDocType = "HST Questionnaire"
                 
                       {

                             vDocType = "HSTDoc"
                             vDir = "HSTDOC\"
                       }

     else
     

                 if vDocType = "Interp 1"
                 
                       {

                             vDocType = "Interp"
                             vDir = "Interp\"
                       }


     else
     

                 if vDocType = "Interp 2"
                 
                       {

                             vDocType = "Interp2"
                             vDir = "Interp2\"
                       }


     else
     

                 if vDocType = "Interp 3"
                 
                       {

                             vDocType = "Interp3"
                             vDir = "Interp3\"
                       }
           

     else
     

                 if vDocType = "Hst Recieved Doc"
                 
                       {

                             vDocType = "HSTRec"
                             vDir = "HSTRec\"
//Writeln(vDocType)
//Writeln(vDir)


                       }
     else
     

                 if vDocType = "HST Sent Back Doc"
                 
                       {

                             vDocType = "HSTSback"
                             vDir = "HSTSback\"



                       }

// This is setting the local directory of where the dialog box is to open to select files
LocalCWD("c:\Attach")
// this runs the pick the file dialog
vresult = @localfiledialog("choose a Document to work with", "*.pdf")
           


     if  Vresult = ""

Then

     {
     @Msgbox("","You Have not selected any Document to process","")
     LocalCWD("C:\sesame\") // puts local path back to C sesame
     
     }
else


     {
// Sets the name to use during renaming, moving and displaying pdf
vrname = (ptid + vDocType +".pdf")
//Writeln(vrname)
vDirNfile = (@ClientLocalValue("pathVariable") + vdir + vrname)
//Writeln(vDirnfile)



// check to see if a file already exists so it will append it instead of replacing it (you will need a file utility called merge)

     
iF      FileExists(vDirNfile) // needs to be changed based on working directory
     {
     
m = @shell("c:\sesame\merge.exe -qm " + vresult + " " + vDirNfile  + " -o " + vDirNfile)

D = @Shell("Move C:\Attach\*.pdf c:\store")





     }
     else
     {
           // Renames pdf from original to new name of patient ID plus word script
           n = @Shell( "ren " + @Chr(34) + vresult + @Chr(34) + " " + @Chr(34) + vrname + @Chr(34) )
           // moves from script directory to done
           m = @Shell( "move " + @Chr(34) + "c:\Attach\" + vrname + @Chr(34) + " " + @Chr(34) + @ClientLocalValue("myscriptpath") + vdir + @Chr(34) )

// this runs my subroutine that makes the checkboxes red or green and a view button visible or not based on if the documents are available
           ynUpdate()

     }



     
// puts local directory back to c:\sesame
LocalCWD("C:\sesame\")


}

}

  

Team – Together Everyone Achieves More
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Using Sesame for a document database
Reply #20 - Mar 29th, 2013 at 5:15am
Print Post Print Post  
As Bob mentioned you can get the end results using Sesame in many different ways.  I also practically use the same approach as Bob using the Diaglog Box While inserting file in the subform. In the planning phase, you will have to decide as to What kind of subform you are going to use? There are different ways you can input such as already existing file or scanner as the input device. Also whether you want to have ability to insert documents from the other forms or database. I had to design and re-design my module several times over the years to accommodate the growing needs, and some of them involved the basic structure change.... ouch.. that hurts! Some of it is indispensable and help learning while others are simply avoidable by proper planning. I am sure most of the members here have some needs and have designed their own system and knowing them, they will share their methods as Bob did. That will start making you think and you will come up with your own unique system with the knowledge of sbasic commands and its implementation.

I use naturally linked subform to store document info such as path and description and there has to be some common field to link them. This is a must in case if you need to re-parent them. It is also needed when you insert a new subform record from another database and forms. I do not see that linking common field in your image of subform.

The most important and the first step is the inserting the subform record with path and description.  The next one is the viewing and displaying the record and opening the document is relatively easy.  Just as Bob, I also use Dialog box and give the name with path. By hitting Process button I pick that in my clip board and paste to Save as the subject file. 

« Last Edit: Mar 29th, 2013 at 6:34am by Bharat_Naik »  
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Using Sesame for a document database
Reply #21 - Mar 30th, 2013 at 2:53pm
Print Post Print Post  
StreifLicht, how did you put the image in the post of the forum? I want to post a couple of images of my document modules for you to see but I, somehow, cannot upload the image to the forum web-directory. I can use my own site to place the image and display here in the forum post but just wondering, how you did it.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Using Sesame for a document database
Reply #22 - Mar 31st, 2013 at 12:40am
Print Post Print Post  
Bharat,

Use the text element shown in the image below to "attach" and image to you post. It will be uploaded and stored on our server.
  

sc.jpg ( 96 KB | 81 Downloads )
sc.jpg

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Using Sesame for a document database
Reply #23 - Mar 31st, 2013 at 1:31am
Print Post Print Post  

I am not seeing:
________________________________________
Attachement:
Attachment1 --------------------------------- Browse
__________________________________________

Part of the window in my post Reply section. What do I do to bring that up?
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Using Sesame for a document database
Reply #24 - Mar 31st, 2013 at 3:56am
Print Post Print Post  
Do you see "Collapse/Expand additional features"? (see picture above)
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Using Sesame for a document database
Reply #25 - Mar 31st, 2013 at 4:19am
Print Post Print Post  
As you can see there is no attachment section in spite of expanding the section.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx





  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Using Sesame for a document database
Reply #26 - Mar 31st, 2013 at 4:55am
Print Post Print Post  
hmmmm, odd. I checked the page source and found nothing interesting. I also read through the forum options and found attachments turned on and seemingly happy. I'll have to dig through the forum source code to see if I can find some reason why some can see and others cannot.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Using Sesame for a document database
Reply #27 - Mar 31st, 2013 at 5:37am
Print Post Print Post  
Thanks Mark for looking into this.
  
Back to top
 
IP Logged
 
StreifLicht
Member
*
Offline



Posts: 17
Joined: Mar 15th, 2013
Re: Using Sesame for a document database
Reply #28 - Mar 31st, 2013 at 8:51pm
Print Post Print Post  
Mark,
if you are going to check the "attachment issue" then maybe you can have a look at the email notification function.
It's because i am getting no email reminder even if i check the "Check this if you wish to be notified of replies to this topic." option.

Bharat,
i am very interested in your document modules.
I have read the posted code an looked in the two big manuals (programming and main manual). There are a lot of possibilities, a lot of commands  Wink I think i should got step by step. Currently i try to reach the goal to add a file to a field and get the possibility to call up the windows defined programm for reading.
In other words to add a pdf file to a field and then make it readable via adobe acrobat reader.
Lateron i would like to expand to up to ten addable documents. So currently i have a test database in use.
  
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Using Sesame for a document database
Reply #29 - Apr 1st, 2013 at 4:07am
Print Post Print Post  
StreifLicht, I am posting here some images just to give an idea of Document Module. 

StandAlone Document Form



DocumentSubform with mainform




FormAsDialog for inserting new records



DocumentSubMenu on pressing the document button on mainform



On choosing view section - it display all documents in the record - one can choose to open it.



  
Back to top
 
IP Logged
 
StreifLicht
Member
*
Offline



Posts: 17
Joined: Mar 15th, 2013
Re: Using Sesame for a document database
Reply #30 - Apr 1st, 2013 at 8:27pm
Print Post Print Post  
Bharak,
thank you for posting. This is what i would like to have.

Currently i encounter some small problems. Should i post it in this thread or should i open a new one? But maybe it's better to have it in one thread.

I test some basic commands, just to see how it works..

Bound to.... This is the field name right?
Can change the field name? Or should i delete the field and add a new one?

What happened?
I added an element (Text Box, Bind Element to "New Date Field")
Afterwards i saw that the label was wrong typed (Entr Date Box instead of Entry Date Box).
I changed the Label to "Entry Date Box"
But in the Property Editor Drop Down i see
only "Entr Date Box".
How can i change this to the correct name?

I mean to have the field names equal to the labels...
  

Bound_to.png ( 12 KB | 68 Downloads )
Bound_to.png
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Using Sesame for a document database
Reply #31 - Apr 1st, 2013 at 8:39pm
Print Post Print Post  
Manage Database ----> DatabaseName ----> Managefields --->Change Field Name --->fill the new Name --->  Add transaction to Batch ---> Run Batch

The above should change the field's name and it will be reflected in the property Viewer.
  
Back to top
 
IP Logged
 
StreifLicht
Member
*
Offline



Posts: 17
Joined: Mar 15th, 2013
Re: Using Sesame for a document database
Reply #32 - Apr 1st, 2013 at 9:00pm
Print Post Print Post  
That worked fine.
The property editor now shows the desired field names.

Only the Program editor shows not the updated fields.
(Still Entr Date Box instead of Entry_Date_Box)
  

Bound_to1.png ( 7 KB | 67 Downloads )
Bound_to1.png
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Using Sesame for a document database
Reply #33 - Apr 1st, 2013 at 9:41pm
Print Post Print Post  
There are 3 things, namely

Label
Element Name
Field Name

It is Element name is displayed in Program Editor

You can change the Element Name in Property Editor

Select Element by clicking it ---> Property Editor -> Other tab ---> Name --> <F5> will bring on current Name ----> Type over the new Name -->Press the arrow on the right side end to take the effect ----> view the change of Name in property viewer ----> the name change will be also reflected in the Program Editor.
  
Back to top
 
IP Logged
 
StreifLicht
Member
*
Offline



Posts: 17
Joined: Mar 15th, 2013
Re: Using Sesame for a document database
Reply #34 - Apr 1st, 2013 at 10:26pm
Print Post Print Post  
Smiley  Ok, thanks. Understand...
  
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Using Sesame for a document database
Reply #35 - Apr 1st, 2013 at 11:35pm
Print Post Print Post  
Just to clarify the basic:

Element Label and Name deals with Layout or Forms while fields is to database. One application can have multiple databases and one database can have multiple forms.

As far as I know all commands in layout deals with Element Names except @XResultset ( ) commands, that works directly on database and hence uses field name.
  
Back to top
 
IP Logged
 
StreifLicht
Member
*
Offline



Posts: 17
Joined: Mar 15th, 2013
Re: Using Sesame for a document database
Reply #36 - Apr 3rd, 2013 at 8:38pm
Print Post Print Post  
While testing a small program i get this error code which i do not know the reason.
  

PopupSelectPosition.png ( 5 KB | 72 Downloads )
PopupSelectPosition.png
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Using Sesame for a document database
Reply #37 - Apr 3rd, 2013 at 8:56pm
Print Post Print Post  
0 - Default position (100 pixels left of the right top edge of the main window).
1 - Absolute screen position of xpos and ypos.
2 - xpos and ypos relative to the top left corner of the main window.
3 - xpos and ypos relative to the top left corner of the form's window.
4 - xpos and ypos relative to the form's top left corner.

I usually use:

PopupSelectPosition(4, @Xpos(LEName), @Ypos(LEName))

This is relative to the button or the element where the code is placed. (You do not have to name the LEName)  Use the code as it is. LEName defaults to the LE the code is in.

This way the popup will be right by the subject element.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Using Sesame for a document database
Reply #38 - Apr 3rd, 2013 at 9:14pm
Print Post Print Post  
Bharat, I think StreifLicht is getting a syntax error, not a problem running the subroutine (that may come later).

StreifLicht, could you post a the snippet of code around that subroutine call. I don't see anything wrong with the subroutine name itself. If you are getting an error from earlier code, it can cause a cascade. Is this the first error, or is is several errors deep?
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged
 
StreifLicht
Member
*
Offline



Posts: 17
Joined: Mar 15th, 2013
Re: Using Sesame for a document database
Reply #39 - Apr 3rd, 2013 at 9:27pm
Print Post Print Post  
LEName is Layout Element Name right?
This works  Smiley Thank you again Bharat.
Currently i play around with some snippets
to learn the basics. Im not a programmer
so it will take some time...  Wink

  
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Using Sesame for a document database
Reply #40 - Apr 3rd, 2013 at 9:34pm
Print Post Print Post  
Quote:
LEName is Layout Element Name right?


You donot even have to write Layout Element Name. LEName means current layout element. It is like ThisElement. If you just put the line as it is, it will work fine. If you replace LEName with the Current Element Name - that should work too.
  
Back to top
 
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Using Sesame for a document database
Reply #41 - Apr 4th, 2013 at 2:21pm
Print Post Print Post  
Quote:
Currently i play around with some snippets
to learn the basics. Im not a programmer
so it will take some time... 


Other than Lanticans, most of us here are amateurs. Thanks to Sesame for providing us with the platform and all the tools, so that we can design and program applications just like programmers do and give us ability to see how the logic is put to use through programming. Without unparalleled support by Lanticans, none of these would work! Thanks for all the support.  So, keep going with your own speed. We all have passed through that and we understand.
  
Back to top
 
IP Logged
 
Carl Underwood
Senior Member
Members
*****
Offline



Posts: 1350
Location: New Hampshire
Joined: Mar 11th, 2003
Re: Using Sesame for a document database
Reply #42 - Apr 7th, 2013 at 9:18pm
Print Post Print Post  
Bharat_Naik wrote on Apr 3rd, 2013 at 9:34pm:
LEName means current layout element. It is like ThisElement.


Huh! ???

Are you sure you don't have "LEName" set up as a variable? That does NOT work for me.
  


Carl Underwood
CDU Computer Consulting LLC
Epsom, New Hampshire
Back to top
IP Logged
 
Bharat_Naik
Senior Member
Members
*****
Offline


Ever ready to learn and
share

Posts: 1202
Location: Chicago,  Illinois
Joined: Dec 16th, 2003
Re: Using Sesame for a document database
Reply #43 - Apr 7th, 2013 at 10:43pm
Print Post Print Post  
Carl, you are right! LEName should be replaced by ThisElement, that will take the current element as reference point.
  
Back to top
 
IP Logged