Home | Forums | Contact | Search | Syndication  
 
 [login] [create account]   Wednesday, June 18, 2025 
 
slxdeveloper.com Community Forums  
   
The Forums on slxdeveloper.com are now retired. The forum archive will remain available for the time being. Thank you for your participation on slxdeveloper.com!
 Architect Forums - SalesLogix Scripting & Customization
Forum to discuss writing script in Architect plugins for SalesLogix & general SalesLogix customization topics (for Windows client only). View the code of conduct for posting guidelines.
Forums RSS Feed


 Back to Forum List | Back to SalesLogix Scripting & Customization | New ThreadView:  Search:  
 Author  Thread: Yet Another datagrid question
Dunhill
Posts: 4
 
Yet Another datagrid questionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Apr 07 10:59 AM
fiogf49gjkf0d
I'm on version 6.2.6

Created a new form / and datagrid for the Contacts. I would like to be able to get the value of the row selected, but as of yet nada.

I've tried the:

datagrid.getcurrentfield("fieldname")

Also:

for x = 0 to datagrid.selection.count - 1

msgbox datagrid.selected(x)

msgbox datagrid.selected.item(x)

next


These dont throw an error, but dosent return any values either


Any help would be greatly appreciated..
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: Yet Another datagrid questionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Apr 07 12:00 PM
fiogf49gjkf0d
There are 2 paradigms with the datagrid, multi-select or not.
1) Multi-select: False - GetCurrentField("") returns the primary key. You may need something extra when using a fieldname in GetCurrentField, as I've always just dealt with the primary key and underlying recordset.
2) Multi-select: True - .Selected.* returns the values you want. MAJOR CAVEAT: You MUST have the primary key as a column in the datagrid. You can make it invisible but it has to be there. ALSO: You may have to set sortable to true. This loads the ENTIRE RECORDSET into memory so if you have a datagrid returning all 5k account records in your database, it's going to be S...L...O...W.

It's kind of a shame that this isn't officially documented anywhere but it's something one has to "stumble" upon. Good thing you tripped on this site, eh?
[Reply][Quote]
Ryan Farley
Posts: 2265
slxdeveloper.com Site Administrator
Top 10 forum poster: 2265 posts
 
Re: Yet Another datagrid questionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Apr 07 12:27 PM
fiogf49gjkf0d
A few ideas. Make sure your datagrid has a basetable and keyfield. Also, the method of using the Selection collection only works if you manually add the ID field to the grid layout (you can then make it not visible, but it does have to be there).
[Reply][Quote]
Dunhill
Posts: 4
 
Re: Yet Another datagrid questionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Apr 07 1:18 PM
fiogf49gjkf0d
Woot! Thanx Guys!

I had to drag the attachmentid down into the grid along with the contactid, and that did it. Returns the attachmentid now based on selected item within the grid.

Yes ... I'm very happy these Forums are here.

A little history on what I'm working on:

I work for a financial firm and our user base had many attachments they required coming over from Outlook to SLX. I've completed the code/process to pull out the Outlook contact attachments "word, excel files, etc" , and using Scribe have imported the attachments into SLX keeping the contact relationships intact. *whew* I'm done!?

NOPE!

New problem for our business concerning attachments:

Opening attachments in SLX works fine. Our problem is we have many departments that do not / can't share banking information. So when / if a user were to click the "Save As" within Word or Excel, whatever they are presented with not only they're own documents, but the entire UNC map location of every users documents! Bad! Very Bad!

As far as I know there is no way to indicate a separate user UNC location for attachment storage within SLX. I'm not required to lock each user from others attachments, but keep MS word, Excel "save as" from being an option when the app opens the file.

I'm very close to having something in script that will find the attachment *Thanx again * and before loading my instance of Word disable the "Save As" option. When word comes up everything functions as expected except ... you guess it! "Save As". Now the UNC of course is still out there, but the user will not have the entire attachment folder displayed in plane view.

Thanx again U2










[Reply][Quote]
Dunhill
Posts: 4
 
Re: Yet Another datagrid questionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Apr 07 1:24 PM
fiogf49gjkf0d
Woot! Thanx Guys!

I had to drag the attachmentid down into the grid along with the contactid, and that did it. Returns the attachmentid now based on selected item within the grid.

Yes ... I'm very happy these Forums are here.

A little history on what I'm working on:

I work for a financial firm and our user base had many attachments they required coming over from Outlook to SLX. I've completed the code/process to pull out the Outlook contact attachments "word, excel files, etc" , and using Scribe have imported the attachments into SLX keeping the contact relationships intact. *whew* I'm done!?

NOPE!

New problem for our business concerning attachments:

Opening attachments in SLX works fine. Our problem is we have many departments that do not / can't share banking information. So when / if a user were to click the "Save As" within Word or Excel, whenever they are presented with not only they're own documents, but the entire UNC map location of every users documents! Bad! Very Bad!

As far as I know there is no way to indicate a separate user UNC location for attachment storage within SLX. I'm not required to lock each user from others attachments, but keep MS word, Excel "save as" from being an option when the app opens the file.

I'm very close to having something in script that will find the attachment *Thanx again * and before loading my instance of Word disable the "Save As" option. When word comes up everything functions as expected except ... you guess it! "Save As". Now the UNC of course is still out there, but the user will not have the entire attachment folder displayed in plane view.

Thanx again U2










[Reply][Quote]
Dunhill
Posts: 4
 
Re: Yet Another datagrid questionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Apr 07 1:27 PM
fiogf49gjkf0d
Crap ... was trying to edit my last post , and created another. Arg .. someone please delete the first one? Thanx
[Reply][Quote]
Jeremy Brayton
Posts: 491
Top 10 forum poster: 491 posts
 
Re: Yet Another datagrid questionYour last visit to this thread was on 1/1/1970 12:00:00 AM
Posted: 30 Apr 07 1:40 PM
fiogf49gjkf0d
There's no way to segregate the attachment directory like you want. The major problem is remotes but the other is the fact that the branchoptions table holds the paths and it only allows a single row.

Now, having said that if you do not have remotes could you hack something together? Most likely. Attachments main purpose is to synchronize those files, thus the need to store the branchoptions record along with some other bits of data. Could you have an attachment table and a manual process that segregates everything accordingly? In theory I believe so but you aren't going to be playing nice with the existing attachments structure. No using Application.BasicFunctions.InsertFileAttachment or any of the other functions, you'll have to roll your own (which is as trivial as adding a record to the attachment table and copying a file to the adequate directory).

Another method I just thought of would be to have an attachment "helper" class that sits on top of the standard attachments. When a user requests attachment X, instead of it being opened in UNC, your helper copies this file to a local directory (My Documents\SalesLogix?) and then opens THAT file. Save As stores to that location or My Documents. The only and major issue with this is you'll have a hard time detecting when the document was updated in Word so that you copied the file back to the "main" attachment directory. One method SalesLogix used in the past was a modal dialog box that said "Are you finished editing?" then when you clicked Yes it would reimport the document. This was how Mail Merge templates were handled (completely inside Word) before SLX created their template manager that is basically a wrapper around Word.
[Reply][Quote]
 Page 1 of 1 
  You can subscribe to receive a daily forum digest in your user profile. View the site code of conduct for posting guidelines.

   Forum RSS Feed - Subscribe to the forum RSS feed to keep on top of the latest forum activity!
 

 
 slxdeveloper.com is brought to you courtesy of Ryan Farley & Customer FX Corporation.
 This site, and all contents herein, are Copyright © 2025 Customer FX Corporation. The information and opinions expressed here are not endorsed by Sage Software.

code of conduct | Subscribe to the slxdeveloper.com Latest Article RSS feed
   
 
page cache (param): 6/18/2025 6:31:59 AM