Results 1 to 9 of 9
  1. #1
    Join Date
    Dec 2012
    Location
    Huntsville, AL
    Posts
    379
    Provided Answers: 2

    Unanswered: Unable to Pull Values From MMR Form

    I have a folder that contains a Many-to-Many Relational Field (MMR) form. I have specified the exact folder that I am looking for within the script; however, I am unable to pull the contents of the MMR form. When I attempt to do the logical thing, I keep getting errors (I am using 'Records from Field'). Similar scripting already exists within this program but this newest addition simply will not work. Please help!!!

  2. #2
    Join Date
    Jul 2011
    Posts
    176
    Hi!
    You cannot pull the records from a many to many relational field by specifying the folder alone.

    First get the records of that folder into a variable.
    Then use For each loop and get the records in the many to many relational field of each record.
    Join all the records by Recordset boolean.

  3. #3
    Join Date
    Dec 2012
    Location
    Huntsville, AL
    Posts
    379
    Provided Answers: 2
    asokram,
    That is exactly my problem - I cannot get the records. The folder containing these records is identified but when I try to set the variable up to pull the records, all I get is an error statement. I already have several MMR's that I am pulling from in the program... and those work. When I try to replicate those earlier actions (with new variables, of course), things simply do not work and I am (again) at a complete loss on how to proceed.

    I am sure that the solution to this is basic but without knowing what that solution is, I cannot proceed. Any help would be very much appreciated.
    Daryl G
    Last edited by fireant911; 02-10-13 at 14:56.

  4. #4
    Join Date
    Jul 2012
    Posts
    94
    Provided Answers: 4
    Put screenshot of script, may be we can solve problem.

  5. #5
    Join Date
    Dec 2012
    Location
    Huntsville, AL
    Posts
    379
    Provided Answers: 2
    MacHeuS,
    Thanks. Attached are two scripts that go with this (attachment 1 and attachment 2). The first script (attachment 1) allows the user to select a value from a list ($course_to_check_global) and it stores it in a separate MMR (temp_storage_MMR). This was assigned a variable also - I suspect all five lines of this work... at least they seem to work. The second script (attachment 2) is the problem exists. Line 5 is what DOES NOT work - I need for it to pull the records from the earlier value but I keep getting error statements and no values. For example, if I first select 'Industrial Engineering Technician' (attachment 3 - this uses the script in attachment 1), I need to capture all five courses that make up this position (attachment 4). Please help because I think I know how to handle the next scripting required but I cannot move forward until I am able to capture the courses.

    The purpose of this particular scripting is to look at the people that are assigned a particular position ('Industrial Engineering Technician' in the example case) and compare the training courses that these individuals have completed to those courses required for that position (SE-100, SE-102, SE-107, SE-109, and SE-201 - these are the five courses required for the position).
    Sincerely,
    Daryl G
    Attached Thumbnails Attached Thumbnails first sheet.jpg   pull_courses.jpg   select title.jpg   example.jpg  

  6. #6
    Join Date
    Dec 2012
    Location
    Huntsville, AL
    Posts
    379
    Provided Answers: 2
    I have gone back into my scripting again and copied the scripting used in another part of the program that does the same type of behavior that I am trying to use (I only changed the naming of the variables)... yet it STILL refuses to cooperate. I just receive the following error statement:

    2:12:57 PM error Script error on line 5: The action can be executed only with the 'Job Titles' record type.
    Action: [$pull_courses] = Records from Field("Job Titles: courses_MMR", "All records in the field")


    Can someone please help me to get this to work properly?
    Thanks,
    Daryl G

  7. #7
    Join Date
    Jul 2012
    Location
    Ireland
    Posts
    815
    Provided Answers: 17
    I'm unsure what your doing from the iamges, I'd need to see the actual database.

    However.....That error message strongly suggests your trying to populate the Many 2 Many field with more than one type of forum, or a different type than the many 2 many was told to accept when you created its field.

    A many to many field can only contain 1 type of form, and only the one you specifyed when creating the Many to Many field.

    Regards
    James

  8. #8
    Join Date
    Jul 2012
    Posts
    94
    Provided Answers: 4
    in first screenshot there is $position_to_find. Copy this line to second screenshots. Put top of code.

    in second screenshot before line 5 create

    'For each record in recordset $position_to_find' code.

    after line 5 'next' and try again.

    (Your code trying to pull a list not in your current form. That list is in your job list form.)

  9. #9
    Join Date
    Dec 2012
    Location
    Huntsville, AL
    Posts
    379
    Provided Answers: 2
    MacHeuS,
    You are amazing! I tried what you suggested and it worked. Thanks for the explanation on what I was doing wrong. You have taught me an incredible amount about Brilliant Database. With your help, I was able to finish adding another function to my program . I think that I am trainable - I am just really having trouble understanding the required structuring of Brilliant Database.
    Sincerely,
    Daryl G
    Last edited by fireant911; 02-12-13 at 22:44.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •