Announcement

Collapse
No announcement yet.

Limit OneToMany rows

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Limit OneToMany rows

    I'm in a situation where i need a Master/Detail form and the Detail ( multiple records ) number of rows must be limited by a field defined on a Master form.
    In the specific i want to create a form where the user insert a product code and a quantity and after that a list of serial numbers limited by the quantity field.

    Any idea on how to manage this?
    Giorgio Bravi
    Dolphin Software & Thinkware
    www.dolphin.it

  • #2
    depending on the database the way to do it is to use limit (sqlite/mysqlmariadb) / where rownum<... (oracle) etc...
    And you should be able to use a variable for that then.
    select ... where rownum<[mymax] order by something

    Comment


    • #3
      Only problem is that the limit statement is sometimes leading to syntax error depending on the state of the form. That's a SC bug.
      Albert Drent
      aducom software netherlands
      scriptcase partner, reseller, support and (turn-key) development
      www.scriptcase.eu / www.scriptcase.nl

      Comment


      • #4
        I know how to populate and show already inserted records
        My question was how to represent only a certain number of rows in function of the quantity that is a field inserted in a given header in a master / detail form and the detail is a form with multiple records.
        Attached Files
        Giorgio Bravi
        Dolphin Software & Thinkware
        www.dolphin.it

        Comment

        Working...
        X