Results 1 to 11 of 11
  1. #1
    Join Date
    Oct 2014
    Posts
    88
    Provided Answers: 1

    Unanswered: Many Unnecessary Columns in Many-to-many table & PRINT ISSUES

    Hi there everyone......

    PROBLEM 1
    i created a many-to-many table and with the help of James and other Bosses here i created a button that upon click adds up a new column to table. the issue is that when i click on the button it adds up too many records... sometimes up to (12 records upon a button click) i read something abt this same problem on the thread "best practices" about changing the "Relational Set" but hasnt helped in my case. another suggestion was to use the "Edit MMR Cell" which hasnt been helpful too. i want to get just one record added below upon a button click.


    PROBLEM 2
    When i create a button to run print scripts and specify which report style to use it doest appear that when the button is clicked. it mostly select the first on the list of report styles. is there something i have to do?

    Regards
    Evans

  2. #2
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2
    Hi Evans
    Sorry I have not got back to you on your previous post, but James has basically done what I was thinking ( when I get time will try to add a refrence form for admin user). Not sure why you are getting multiple new records or having problems with reports but as usual a sample file with a few text labels explaining what is wrong or needs to happen is lot easier to comprehend (with my old brain anyway).
    Happy New year
    David

  3. #3
    Join Date
    Oct 2014
    Posts
    88
    Provided Answers: 1
    Quote Originally Posted by tamcind View Post
    Hi Evans
    Sorry I have not got back to you on your previous post, but James has basically done what I was thinking ( when I get time will try to add a refrence form for admin user). Not sure why you are getting multiple new records or having problems with reports but as usual a sample file with a few text labels explaining what is wrong or needs to happen is lot easier to comprehend (with my old brain anyway).
    Happy New year
    David
    Thanks for your reply. i will make a file and send to you showing u the problem. Will also be waiting for the add a refrence form.

    Happy New Year
    Regards
    Evans

  4. #4
    Join Date
    Jul 2012
    Location
    Ireland
    Posts
    815
    Provided Answers: 17
    PROBLEM 1
    i created a many-to-many table and with the help of James and other Bosses here i created a button that upon click adds up a new column to table. the issue is that when i click on the button it adds up too many records... sometimes up to (12 records upon a button click) i read something abt this same problem on the thread "best practices" about changing the "Relational Set" but hasnt helped in my case. another suggestion was to use the "Edit MMR Cell" which hasnt been helpful too. i want to get just one record added below upon a button click.
    If your using a query to define a recordset so you can get total values, then you need to check your code so that the query is only returning the results you need.

    When setting a query to work with records, often you will have to use NOT, Contains, Equals, Less Than, Greater Than, in different combinations at the same time in order for a query to return the data exactly how you want it.

    PROBLEM 2
    When i create a button to run print scripts and specify which report style to use it doest appear that when the button is clicked. it mostly select the first on the list of report styles. is there something i have to do?
    When you select the action “Print Records” there are 3 fields that you set. The first allows you to set whether or not the end users sees a print preview. The second option allows you to specify what's printed. For example only the selected records, the current record, or all records in a folder.

    The third option is the one you want, this is the one that allows you to specify the exact report style. I suspect you haven't set this option correctly.

    Regards
    James

  5. #5
    Join Date
    Oct 2014
    Posts
    88
    Provided Answers: 1
    Quote Originally Posted by Tubbritt View Post
    If your using a query to define a recordset so you can get total values, then you need to check your code so that the query is only returning the results you need.

    When setting a query to work with records, often you will have to use NOT, Contains, Equals, Less Than, Greater Than, in different combinations at the same time in order for a query to return the data exactly how you want it.
    Hello, sorry for the delay in replying. i have attached a copy of how i did my queries and scripts thats giving me the unncessary columns. please look at it and make the corrections for me.

    ATTACHEDEXAMPLE.zip




    Quote Originally Posted by Tubbritt View Post
    When you select the action “Print Records” there are 3 fields that you set. The first allows you to set whether or not the end users sees a print preview. The second option allows you to specify what's printed. For example only the selected records, the current record, or all records in a folder.

    The third option is the one you want, this is the one that allows you to specify the exact report style. I suspect you haven't set this option correctly.
    i have been able to retify it thanks to your help. the problem was with the second column. i always set it "Auto" and although i will select the report style it always used the first on the list. selecting "current record" in the second line did the trick for me. Thanks ALot

    Regards
    Evans

  6. #6
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2
    Hi Evans
    Looking at your script , you appear to be quering the root folder for all blank "no fields". Suspect you would get a random record set from multiple folders including recycle bin - do you mean blank "item no field " records?
    Regards
    David

  7. #7
    Join Date
    Oct 2014
    Posts
    88
    Provided Answers: 1
    GoodDay David, lets make it like... You try writing the script to give one record in the table upon a click. So I can see how u did it.

    Regards
    Evans

  8. #8
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2
    Hi Evans
    Modified your file with comments in script. Just creates 1 record in M2M field. Added couple of other ideas. To go further need specific requirements - queries have lots of options and hard to make general example. Let us kown if this is some where near what you need.
    Regards
    David
    Attached Files Attached Files

  9. #9
    Join Date
    Oct 2014
    Posts
    88
    Provided Answers: 1
    Hi David.... Exactly what i was trying to do. You will see that when you add a new record it falls above the previously added ones. how do u make it fall below the already added ones? i even tried using the "Script and Behaviour" property of the M2M table on the form editor to add the record. it adds the new record but it falls unto of the other records. i want the reverse instead.

    Many Many Thanks to you.... im very grateful and youve been very helpful. Gracias

    Regards
    Evans

  10. #10
    Join Date
    Sep 2011
    Location
    Australia
    Posts
    264
    Provided Answers: 2
    Hello Evans
    Try this new attachment. Uses the count of rows to set a field value which allows M2M field to be sorted with highest number last. May be other ways to do this but this should work when adding any new row.
    Regards
    David
    Attached Files Attached Files

  11. #11
    Join Date
    Oct 2014
    Posts
    88
    Provided Answers: 1
    Hello David... thanks alot for the step by step guide. thats all i wanted to do. will try applying the same knowledge in my project.
    will notify you if i face any challege alongside. Gracias Amigo

    Regards
    Evans

Posting Permissions

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