Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2013
    Posts
    17

    Unanswered: Deleting Relational Records in a Folder

    Good Day,

    1) I have been working on a project and have hit a road block, Im sure theres a simple solution but its not working the way I thought it should.

    I have a folder with a many-many relational field : See attached image .Click image for larger version. 

Name:	Brilliant q1.jpg 
Views:	18 
Size:	279.1 KB 
ID:	16116

    I have a Button scripted to delete a record from the relational field. I am using the Delete Record(s), Relational Field Content, "Folder", "Field", "Selected Records"
    You would think that it would "Delete" the selected records, but it always deletes the current record of the folder, not the relational records...

    If I select a relational record, and right click and select " Delete Records" it will delete the relational record as it should.
    I need to use the Button method, as I need to ask the user if they are sure they want to delete, because of the way it affects other records in the program.

    2) How do I select and extract the Field Values out of an individual relational record? I would like to assign these values to variables so I can search other folder contents based on these values.

    Any direction would be valuable.. thank you.

    D

  2. #2
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2
    Hi
    Tried creating a record set based on selected record in MM field and then deleted record from this record set. Seemed to work ok but be aware of reports that move to recycle bn action may be more reliable then delete. Likely other ways to get same results. See copy of script (based on Evan's file that I had open at the time).

    1/ [$MM_del] = Records from Field("STUDENT FORM: TABLE: SEMESTER 2 PAYMENTS", "Selected records")
    2/ Show Message ([$mm_del], , Ok) ****replace line with warning and IF Else action*****
    3/ Delete Record(s) (Completely delete records (irreversible), From Recordset: [$mm_del])
    Regards
    David

Posting Permissions

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