Alpha Video Training
Results 1 to 4 of 4

Thread: SET export current record

  1. #1
    Joseph Claeys
    Guest

    Default SET export current record

    This seems like an easy task but it's giving me fits...

    I'm moving my office database from FM to A5 so I'm moving from a flat-file system to the relational and something that was easy has suddenly become somewhat complicated (for me anyway).

    I have a SET called CASES with a 1:N relationship with REFERRALS (I can test the same kid many times). The REFERRALS has a 1:1 with test scores from a number of tests (so there are several test tables). Anyway I need to export a single students scores... I've read up on the flattenquery and such but I don't know if I need that... I have a form based on the SET with a subform for Referrals (the 1:N). I want to export based on the current record. Well I keep getting all the records (or none depending upon my current attempt) So here is the script that doesn't work (I tried using table.current(1), etc but that didn't seem to help).

    BTW: I took out some of the fields to shorten the script for viewing...


    a_tbl = table.current()
    query.order = "recno()"
    record_number = current_record_number()
    query.filter = "recno() = " + record_number
    query.options = "I"

    export.type = 0
    export.names = .t.
    export.file = "F:\ALPHA 5 projects\A5 Psychoffice\Report Templates\merge_gtc.asc"
    export.options = "LT"
    export.field_sep = ","
    export.record_sep = ""CR""LF""

    export.fields = 43
    export.field1 = "Case_Info-"Stu_lfirst"
    export.field2 = "Case_Info-"Stu_mid"
    export.field3 = "Case_Info-"Stu_llast"
    export.field4 = "Case_Info-"Dob"
    export.field5 = "Case_Info-"Age"
    export.field6 = "Case_Info-"Sex"
    export.field20 = "Referral_Info-"Begin_test"
    export.field21 = "Referral_Info-"End_test"
    export.field22 = "Referral_Info-"Report"
    export.field23 = "Das_Data-"Patt_con"
    export.field24 = "Das_Data-"Rec_design"
    export.field25 = "Das_Data-"Word_def"
    export.field34 = "Group_Achievement-"Itbs_math"
    export.field35 = "Group_Achievement-"Itbs_language"
    export.field36 = "Group_Achievement-"Core_total"
    export.field37 = "Group_Achievement-"Mat_reading"
    export.field38 = "Group_Achievement-"Mat_language"

    a_tbl.export()

  2. #2
    "Certified" Alphaholic Stan Mathews's Avatar
    Real Name
    Stan Mathews
    Join Date
    Apr 2000
    Location
    Bowling Green, KY
    Posts
    25,119

    Default RE: SET export current record

    You've set up your query nicely for recno(), but you haven't run the query......

    Add

    i_indx = a_tbl.query_create()

    after the

    query.options = "I"

  3. #3
    Joseph Claeys
    Guest

    Default RE: SET export current record

    Thanks that works for the Parent, but my child record which is present on the 'form' as a 'subform' isn't being filter... in other words I get the current parent and all of the child records. So does this mean that A5 treats the 'current record' as only the parent? (even when the child is displayed on a particular record?). Hmmmmmm maybe I just need to think about this for bit...

    ~joe

  4. #4
    Joseph Claeys
    Guest

    Default RE: SET export current record

    Never mind I made a custom query on the child and it worked just fine. I guess I can type faster than I can think...

    ~joe

Similar Threads

  1. Copy record to current record not working
    By Larry Ternowski in forum Alpha Five Version 6
    Replies: 3
    Last Post: 07-15-2005, 05:01 AM
  2. Export current record
    By dparkins in forum Alpha Five Version 5
    Replies: 4
    Last Post: 04-01-2004, 05:10 AM
  3. Print Current Record Problem with Child Record
    By debwelch in forum Alpha Five Version 5
    Replies: 26
    Last Post: 09-27-2003, 08:11 AM
  4. DB Export options on current version 4.5
    By Butch Gibour in forum Alpha Five Version 4
    Replies: 1
    Last Post: 08-28-2001, 09:55 AM
  5. Current Record
    By Eric in forum Alpha Five Version 4
    Replies: 3
    Last Post: 09-21-2000, 10:16 AM

Bookmarks

Posting Permissions

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