FredP Posted June 4, 2008 Share Posted June 4, 2008 I have a repeating field used to hold ID#s of other records that are linked to a record specifically. We usually only have 1 or 2 links between these two tables, so I had originally set it up as a repeating field with 8 repeats that active a value list drop down of the available ID#'s and Names that can be added for this record. All of that works. But, I would like to create a goto related record sort of button, but don't know how to say Goto Related record based on the 2nd, 3rd, repeated field. IE: I may have the follow recordID's in the repeated field Field::Iteration1: Id#234 Field::Iteration2: Id#412 Field::Iteration3: Id#011 I would like to have a button that repeated down the side of these id's as well, and if i clicked on the third button, it would go to related record based on fieldname::iteration3, or in the example above, would go to recordid#011 Anyone? Fred Link to comment Share on other sites More sharing options...
Molson Posted June 4, 2008 Share Posted June 4, 2008 I would like to have a button that repeated down the side of these id's as well, and if i clicked on the third button, it would go to related record based on fieldname::iteration3, or in the example above, would go to recordid#011 Hi Fred, Definitely not condoning the use of repeaters for storing ID's, but perhaps your situation warrants their use. Here is a suggestion. Add a global field to the table with the repeating field. Create a relationship between the global field and the id field in the related table. Write a script that sets the global to the repeat repetition. Set Field [ MAINTABLE::globalID; MAINTABLE::repeatField[Get(ScriptParameter)] ] Attach the the script to an invisible button, one button for each repetition. Give the button a script parameter equivalent to the repetition. A problem you will run into with this is once the button completely covers the repetition, it becomes difficult, if not impossible to click into the repeating field for entry. Users will need to tab into the field. HTH, Michele Link to comment Share on other sites More sharing options...
Ender Posted June 4, 2008 Share Posted June 4, 2008 I would strongly recommend revisiting the structure to put these "repeating values" in a portal to a join table instead. Developing work-arounds for repeating fields in the interface is usually a never-ending battle. With a portal, it would be a simple matter to have a button defined to Go to Related Records[]. Link to comment Share on other sites More sharing options...
Molson Posted June 4, 2008 Share Posted June 4, 2008 I would strongly recommend revisiting the structure to put these "repeating values" in a portal to a join table instead. Developing work-arounds for repeating fields in the interface is usually a never-ending battle. With a portal, it would be a simple matter to have a button defined to Go to Related Records[]. Agreed! Also include among the problem(s) I mentioned in my work-around, further workarounds will be required to print related records or total, etc. Link to comment Share on other sites More sharing options...
FredP Posted June 4, 2008 Author Share Posted June 4, 2008 I know you are right. I ran into an issue with a portal when I needed to created locator keys that spanned 4 different tables, from one main menu. With the portals, I couldnt get the combination of information into a locatorkey field without the locatorfield being unstored, which makes it unable to be used as a match field. I honestly dont even know how to explain the problem, except that it works if the UserID is stored in the project record, but I will try I will give a portal another shot now that (with your help) i know more about how it works. Table:Projects has to have supervisors attached to the project some how. But each project also has a table called Tasks that employees can be assigned to. I got it working (like i said with your help) to be able to have a main menu that shows "My Projects" by using locator keys that listed the user#'s assigned to those tasks. That all works swimmingly! But included in the My Projects filter, I also wanted to include a project if the user was a supervisor(which is set inside the table:project) So you see, the problem I have is this: If CurrentUserID# Matches Either A) The User ID on a Table:Task record or B) The UserID inside the project as the supervisor of the project, then it should show up in the main menu, because its Your Project. As soon as I start using portals, from projects, for supervisors, I cannot get a stored and indexed locator key. I dont even think that makes sense. I will try it again, and see if my experimenting can allow me to shed more light on the issue. Fred Link to comment Share on other sites More sharing options...
FredP Posted June 4, 2008 Author Share Posted June 4, 2008 Yes, thanks to Enders help on this thread: http://www.filemakertoday.com/com/showthread.php?p=74133&posted=1#post74133 I will NOT be using repeating fields! thank gosh! and a join table portal it is! Fred Link to comment Share on other sites More sharing options...
Recommended Posts