Jump to content

krabbykabby

Members
  • Posts

    10
  • Joined

  • Last visited

krabbykabby's Achievements

Apprentice

Apprentice (3/14)

  • First Post
  • Collaborator
  • Conversation Starter
  • Week One Done
  • One Month Later

Recent Badges

0

Reputation

  1. I can't seem to wrap my head around this one. What I want to do is take a found set of records and use ALL of the values for a certain field from that set to do new finds iteratively - I want to take that field's value from the first record, do a new find, decide to keep or delete the new found set, then go to the next record in the original found set and do that all over again. I have been trying to do this with a repeating variable since the size of the original found set is going to vary. Any suggestions? Thanks in advance!
  2. I've read that stuff and it makes no sense to me...I am new to plug-ins, so I kind of need it spelled out where to put stuff. Saying "put it in a calculation" means nothing to me - a calculation where? Anywho, any plain language help would be greatly appreciated!
  3. I am working in FM Pro Advanced 9 and trying to conditionally highlight a record in list view when it is the active record. I have the formatting set up so that when a global variable = the record ID, the row highlights grey. I also have written a script that sets the global variable to the record ID of the active record. However, I cannot figure out how to trigger this script every time a record is active in the layout. Basically, if I had FM 11, I would pick the "onRecordLoad" trigger, but of course, I can't do that in FM 9. Any recommendations? I know I'll probably need to use a plugin, but which one should I use and since I'm not very familiar with how they work, can you also explain how to incorporate it into the database? I used myDoScript once and it took me FOREVER to figure out where to put the calculation since the documentation is not written for newbies... Thanks in advance!
  4. I can't figure out how to get the "Call Script Immediately" function to work. I am working with FM 9 and am trying to highlight the active record in the list view. I set conditional formatting such that the fields change background color when $$ID = Programs::ProgramID. I then wrote a script that sets $$ID = Table::RecordID and refreshes the window: Freeze Window Commit Records/Request [No dialog] Set Variable [$$ID; Value:Programs::ProgramID] Refresh Window [] I want to trigger this script every time a record loads, but I don't know where to put the function or what I should use in the parameters. Help?
  5. My God, I am soooo glad I happened upon this post! The pop-up layout window is the answer to all my frustrations with pop-up menus based on value lists. Thanks!
  6. Thanks for your help. In your example file, the drop-down for Value only appears when Type = "School," which is exactly what I want. Somehow though, I cannot get mine to do that - the drop-down appears when I click on the Value field even when Property ≠ "School". I created a cSchool field in the Schools table where the calculation is "School." I then hooked up one TO of Schools from Schools::SchoolID to AdditionalInfo::Value (equivalent to your Table::Value) and the other TO of Schools from Schools::cSchool to AdditionalInfo::Property (equivalent to your Table::Type). Then I set the layout boxes for AdditionalInfo::Value and AdditionalInfo::Property to be drop-down menus populated by value lists equivalent to those in your file. Am I missing something?
  7. I came across this post while looking for a way to count the number of related records with a particular value in a field. I don't completely understand how this function works, but it seems like the SumField parameter only applies if there's some field other than TypeField in the related records that you want to add up when TypeField=Type. I don't need that part, so instead I put 1 into the SumField parameter and it seems like that works (as in, so far it's returning the numbers I expect). I was just wondering if that is a legit way to cut out that portion of the script or if the calculation is by chance giving me the "right" numbers and I'm going to run into problems when I add more records. Also, if you know how this function works, would you mind breaking it down for me? Thanks!
  8. Thanks! I tried Set Field before I posted and that seems to trigger the auto-enter calc as well. However, your fix for adjusting the calc worked great. It now reads: Case ( not IsEmpty ( gAllPrograms ) ; Let ( queueScript = mFMb_DoScript ( "CreateMembershipRecordFromTeams" ) ; gAllPrograms)) instead of: Let ( queueScript = mFMb_DoScript ( "CreateMembershipRecordFromTeams" ) ; gAllPrograms) No more accidental looping!
  9. I wrote a script to create a new record in a related table and populate some of the fields. One of the fields is being populated by a variable that is saved from a global field before switching to the related table, and at the end of the script, I want to clear this global field. Here's what I have written: (starts from Teams table) Commit Records/Requests Set Variable [ $TeamsID; Value:Teams::TeamID ] Set Variable [ $ProgramID; Value:Teams::gAllPrograms ] Go to Layout [ “MembershipPivot” (MembershipPivot) ] New Record/Request Set Field [ MembershipPivot::TeamID; $TeamsID ] Set Field [ MembershipPivot::ProgramID; $ProgramID ] Go to Layout [ “Teams” (Teams) ] Clear [ Teams::gAllPrograms ] For some reason, the script creates the record I want, then clears the global gAllPrograms field and then tried to make another record in MembershipPivot! I can't figure out what is going on. Seems like it's looping but there are no loops in the script. Also, if I take out the last command, Clear [ Teams::gAllPrograms ], it only creates the one record I want and does not loop. Any ideas? Ok, I forgot to mention that I was triggering the script using the DoScript plugin...and that seems to be where the problem is. If I trigger it instead from a button, it works fine. However, if I change the gAllPrograms field to an auto-fill with this calculation: Let ( queueScript = mFMb_DoScript ( "CreateMembershipRecordFromTeams" ) ; gAllPrograms ) the script loops. Clearly I do not understand how this plugin works...any idea how to still trigger the script after gAllPrograms field selection, but avoid the looping issue?
  10. Hi all, I am working on a participant database to store which participants are involved in our different programs. There are several different participant types, and while most of the information we need is the same across types, there are several pieces of information that are only relevant if a participant is a certain type. To avoid having a ton of fields in my People table that will be empty in some portion of the records, I have an AdditionalInfo table linked by ParticipantID to the People table. In the AdditionalInfo table, I also have Property and Value fields. I have set up a layout (based on the People table) where when you choose a particular participant type, the AdditionalInfo table is automatically populated with records where the appropriate participant type-specific categories occupy the Property field (accomplished by button script) and then the user can enter a Value for those properties from a portal. Here's my question: One of the Properties we want to store for "Teacher" participant types is their school. Right now, all schools are stored in a School table and I want users to only be able to pick from schools we have a record for. Since the Value field does not ALWAYS refer to a school, how do I hook this up in the relationship graph? Is there a way to create a conditional relationship (in this case, Value relates to SchoolID only when Property = "School")? Please let me know if additional info would be helpful in solving this.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.