LaRetta Posted October 29, 2005 Posted October 29, 2005 Well, not REALLY random messages ... reminders, prompts and encouragements by Manaagement to Employees depending upon pre-determined selections (which COULD be random or All). Management would add/modify/delete these records (prompts). Record criteria: Duration Start (date) Duration End (date) OR Ongoing (All) AccountName (multikey or All) Privilege Set (multikey or All) Table (multikey or All) Color (blue or red) Layout (multikey or All) Message (maximum character length reserved on most layouts in 25 px. high, layout-wide space. If a User switches to a specific table/layout, prompt field will 'relate' to Message table and provide directions for completing their task. Randon rotation of messages where specified All. How to cycle through the Alls?? A relationship based upon multi-predicate, multilines? Message may simply be to a newer employee, "Don't forget to mention our sale products." I realize I may have to trigger employee/layout movement (I have SecureFM) but I feel a good relationship (even if using global calc or cartesian) may do much of the heavy lifting. I simply can't get a grip on an elegant approach. We will be moving to vs. 8 but it has been requested that I provide this now (vs. 7). This is a group-Management design request. I am simply fulfilling it. How I do it is up to me but they don't want popup windows, Custom Dialog etc - they want one line. I considered a one-row portal, unstored calc, manipulating the relationship for display - or script to set global at User location. There are so many options ... can you give me some direction here? I need some good ideas. Thank you so much! LaRetta
Ender Posted October 29, 2005 Posted October 29, 2005 Imagine that, a customized fortune cookie! I think it would be better to use the random cycling rather than some sort of sequential. Since you want to potentially remember different messages about each AccountName/PrivilegeSet/Table/Layout, to do a sequential cycling would require a counter for each AccountName/PrivilegeSet/Table/Layout/Message. This implies a join table just to hold these counters. For the random approach, use one relationship to see all the messages for the particular AccountName/PrivilegeSet/Table/Layout/Date (using multi-keys on the match side to allow for the "All" matches.) Use this relationship to get a count of messages, and use that count to define the range from which to pull a random related record from. I can imagine several ways then, to pull the random message. Using a Go to Portal Row [ by calculation ] or Go to Record/Request/Page [ by calculation ] to get to the correct record, then set it's message (or key) into a global. Using a ValueListItems() function for the list of messages, and a MiddleValues() function to select a random one. Or in version 8, using the GetNthRecord() function to see the Nth message (where n is the random number in the range.) I don't know which approach would be faster, but since you're looking to do this for each layout change, you may want to test them all (over the network,) to see which, if any, is fast enough for your users.
LaRetta Posted October 29, 2005 Author Posted October 29, 2005 Thank you, Mike. That's started my wheels turning this morning. There will be other fields in this Messages table as well, of course ... I will include an Active (1) flag. I don't want this table to bloat. But I envision them wanting to save messages to reactivate a series for 'new employes' when Invoicing, etc. My initial reaction was negative. I pictured poor staff seeing messages constantly and not being able to work. And refresh, as well as speed, is a concern. As we worked through this idea, I realised it can be quite powerful if used prudently. Some staff simply need more reminders and help than others. And Management reviews data normalization I provide them weekly. And they mention, "Ok. I will mention AGAIN to bla bla to REPEAT BACK a persons credit card number." Another staff may need no such prompt, but Sales Manager notices she is shipping Samples a bit too loosely and wants to prompt with some random suggestions when she views the Include Samples layout (each time she views it) for only the next few weeks. And it needs to be Browse mode, Management controlled. I'm now excited about the concept but concerned that I provide them with a dawg. Taylored assistance is wonderful but not if the cost is too great. I would also like to avoid (at least in this 7 design) extensive scripting or reworking of my solution. I confess to considering just plopping an unstored calc on the layout. I'm hoping to rewrite in 8. I also don't anticipate this file being more than 100 records and max 10 would probably 'relate' at any given time. So at least a one-row portal won't have slow portal/relationship draw speeds. And yes, random is the way to go here. And I would rather not show a message EVERY time if set to All (so random ideally would contain a NONE). If you hang a beautiful painting on your wall and look at it every day and admire it, it will eventually disappear. The power of this is in its being *seen*. Saturation makes things disappear. LaRetta
Recommended Posts
This topic is 7023 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now