Huw Thomas Posted August 27, 2002 Share Posted August 27, 2002 Have multiple databases (one for each department within a company) which feed appropriate information into several 'global' overview databases (effectively giving a 'company' overview of activity) Certain departments may use the same data as other departments, I would like the company databases to reflect this 'common' or 'shared' usage. Originally, had setup a field with checkbox 'department' names entered, which work fine if the user manually checks off their department. How can I achieve this automatically via a script? Insert text works fine for first value that selected from the valuelist, but won't recognise subsequent additional checked values... Set Field achieves the same as above... Am assuming I need the data in single field, as I want to generate a report that is sorted by the departmental usage field, so users can see where data is being used by several departments... (currently using several fields to achieve above, BUT its messy!) Link to comment Share on other sites More sharing options...
CobaltSky Posted August 28, 2002 Share Posted August 28, 2002 Hello Huw, To use the "Set Field" command to place multiple values into a field, so that each will be recognised as a separate value, they must be separated by a carriage return. Thus if Set Field ["gDepartment", "Customer Service"] results in a checkbox field with a single value checked, viz: - Administration X Customer Service - Marketing - Public Relations - Secretariat - Technical Support ...then a formula along the lines of Set Field ["gDepartment", "Customer Service¶Marketing¶Secretariat"] will produce the result: - Administration X Customer Service X Marketing - Public Relations X Secretariat - Technical Support Is this what you are looking for? Link to comment Share on other sites More sharing options...
Huw Thomas Posted September 9, 2002 Author Share Posted September 9, 2002 Hi Ray, Maybe... (re 'Is this what you are looking for?') Each of my records may be used by one or many departments. I wish to track which department is using which record The idea is to then generate a report to show department by department usage of records, and show common usage by two or more departments. Have produced a solution using separate department tracking fields - but this isn't very elegant - was hoping to minimise the field tally! I'll try your sugggestion, but get FMP to read the contents of the department field first, then add the new department via a calculation... Will advise accordingly... Cheers, Huw Link to comment Share on other sites More sharing options...
CobaltSky Posted September 10, 2002 Share Posted September 10, 2002 Yes, Huw, If you can retrieve the current department as a text string using (say) the Status(CurrentGroups) function, then a script procedure which runs along the lines of: If ["Not PatternCount(YourField, Status(CurrentGroups)"] Set Field ["YourField", "YourField & "¶" & Status(CurrentGroups)"] EndIf should do the trick. However you'll still have to deternime how best to ensure that this script is reliably invoked every time a user accesses a record. Link to comment Share on other sites More sharing options...
Huw Thomas Posted September 10, 2002 Author Share Posted September 10, 2002 Cheers Ray, Will try above, the information isn't intended to be dynamic; if it's been used / accessed once or thousand times doesn't matter - purely want to know who's used the info... Regards Link to comment Share on other sites More sharing options...
Recommended Posts