Solved

Using browse button to get file folder.

Posted on 2004-04-14
16
480 Views
Last Modified: 2013-12-18
Is there a way to use a hotspot button having a browse button just like using attachments but in this scenario you will be able to get an EX: C:/test/hotspots/expert.doc --- this will be displayed in your field instead of the usual.
Thank you.
0
Comment
Question by:cyle
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 6
  • 6
  • 3
  • +1
16 Comments
 
LVL 31

Expert Comment

by:qwaletee
ID: 10826508
@Prompt([LocalBrowse]; .... ) returns a filename.  You can assign the return value to a field.
0
 

Author Comment

by:cyle
ID: 10826741
I created a hotspot button and formula @Prompt([LocalBrowse]; "Select a to open"; "0". Had it at 0 and 1 to test. I will not be opening any nsf file. I can open it but it will not display, my field is text and editable (changed it to computed to test) and value is the fieldname.
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 10827018
Try this

FIELD FieldName :=  @Prompt([LOCALBROWSE]; "Select a database to open"; "1");
""

~Hemanth
0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 3

Expert Comment

by:xp_commander
ID: 10827034
Add this formula in your browse button :-

FIELD fpath := fpath ; (where fpath is your file path field)
file := @Prompt([LocalBrowse]; "Select a database to open"; "1");
@If(file = ""; @Return(1); "");
@SetField("fpath";file);
@Command([ViewRefreshFields])
0
 

Author Comment

by:cyle
ID: 10827189
Commander Sir,
  It is giving me "Cannot execute specified command".
0
 
LVL 3

Expert Comment

by:xp_commander
ID: 10827235
This was for ure information only , please remove it ---> (where fpath is your file path field)

Copy this and In this change the fpath to your fieldname

FIELD fpath := fpath ;
file := @Prompt([LocalBrowse]; "Select a database to open"; "1");
@If(file = ""; @Return(1); "");
@SetField("fpath";file);
@Command([ViewRefreshFields])
0
 

Author Comment

by:cyle
ID: 10827262
Yes, I did removed that part.
0
 
LVL 24

Expert Comment

by:HemanthaKumar
ID: 10827272
Notes Ver ?

This command is available form 4.6 only !!
0
 

Author Comment

by:cyle
ID: 10827283
Sorry, I am using 6.5
0
 
LVL 3

Expert Comment

by:xp_commander
ID: 10827290
I assume you running this on Notes Client ? , Can you paste the portion of your code , is there anything else in formula besides this code ?
I just created a test form , two elements , one is Browse button , second is editable text field called fpath , it worked like charm. Are we missing something here ?
0
 
LVL 3

Expert Comment

by:xp_commander
ID: 10827335
Hemant ,

Did you meant from 4.6 only or FOR 4.6 only ?

As I am on Release 6.0.3 September 26,  2003  and it worked great, I agree you don't need the FIELD declaration after R6 release, but just copied the code  from an existing application I worked on. Believe me it works on R6 and above.

From Help files :-
"With Release 6, you no longer need to declare the field receiving the assignment prior to setting its value with @SetField. For R5 or earlier clients, declare the field at the beginning of the formula, as follows:
FIELD Fieldname:=Fieldname; "
0
 

Author Comment

by:cyle
ID: 10827353
Two elements:
 1. field with name fld_filelocation property text & editable value is fld_filelocation
 2. a button
 
FIELD fpath := fld_filelocation ;
file := @Prompt([LocalBrowse]; "Select a database to open"; "1");
@If(file = ""; @Return(1); "");
@SetField("fpath";file);
@Command([ViewRefreshFields])
0
 
LVL 3

Assisted Solution

by:xp_commander
xp_commander earned 125 total points
ID: 10827421
Change this ---> FIELD fpath := fld_filelocation ;
To
FIELD fld_filelocation := fld_filelocation ;


AND

Change this ---> @SetField("fpath";file);
To
Change this ---> @SetField("fld_filelocation";file);


0
 
LVL 24

Accepted Solution

by:
HemanthaKumar earned 125 total points
ID: 10827445
Why do you comlicate it soooo much ??


FIELD fld_filelocation := @Prompt([LocalBrowse]; "Select a database to open"; "1");
""

Will do !!!!


I meant from not form..... fat finger ;-)
0
 
LVL 3

Expert Comment

by:xp_commander
ID: 10827546
B'cuz I am very complicated person..... :p (Just Kidding)

Hey I know , that would work too , it just i had already paste the code at same time  , and was supporting my code, lol.

Cyle , the above code would work too, without any complications ;) , mine just have added lines to check the file is not empty @If thing.





0
 

Author Comment

by:cyle
ID: 10827615
Thank you both your help!!!
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

For users on the Lotus Notes 8 Standard client, this article provides information on checking the Java Heap size and adjusting it to half of your system RAM in attempt to get the Lotus Notes 8.x Standard client to run faster.  I've had to exercise t…
Sometimes clients can lose connectivity with the Lotus Notes Domino Server, but there's not always an obvious answer as to why it happens.   Read this article to follow one of the first experiences I had with Lotus Notes on a client's machine, my…
Come and listen to Percona CEO Peter Zaitsev discuss what’s new in Percona open source software, including Percona Server for MySQL (https://www.percona.com/software/mysql-database/percona-server) and MongoDB (https://www.percona.com/software/mongo-…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question