Page 1 of 5 123 ... LastLast
Results 1 to 10 of 50

Thread: Time Clock

  1. #1

    Time Clock

    Hello

    I am brand new to Lianja but have been working with VFP for years.
    I am trying to open a canvas section with two fileds at the moment.
    I want to run the app and have the first field get the focus. (Employee Badge number.
    Then i will look up the employee info and want to update the second field with the Employee name.
    I can't get the focus to the first field without clicking on it and i cannot refresh the second field with the employee name information.

  2. #2
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,165
    Blog Entries
    22
    When you develop in the app builder you need to switch to runtime view (top right icon).

    The first field on your canvas will have focus.

    If you want to change focus programatically you reference the formitem and call the setFocus() method on it. At runtime. It’s meaningless in development mode.

    Lianja.get(“page1.section1.field1”).setFocus()
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  3. #3
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,842
    If you put the
    Code:
    Lianja.get("pageX.sectionX.fieldX").setFocus()
    in the Page's activate delegate, it will be called when the Page is selected in runtime/Desktop App View.

    Use the badge field's change delegate to update the name field.

    Regards,

    Yvonne

  4. #4
    Hello
    What is the code i would use in the change delegate that would allow me to update all section info ?

  5. #5
    Lianja Team yvonne.milne's Avatar
    Join Date
    Feb 2012
    Location
    Berkshire, UK
    Posts
    1,842
    Hello,

    If you want to update a whole section, have a look at the example_canvasquerypage and example_querypage demo Apps. These use the built-in Section Search Panel, so no additional code is required.

    You can also code your own custom Section Search Panel if required. See Section Search Panels in the documentation wiki for full details.

    Regards,

    Yvonne

  6. #6
    Hi Yvonne

    I will look into it asap. thank you for your assistance

  7. #7
    Hello
    I am trying to fill in an employee badge number in a field then get the employee info from a table and update the employee name in another field. at the same time i am looking up any clocked in information for that employee for that day in another table. i want to then show the information for any clocked in inforamtion in a grid similar to the grids created in VFP. Is this possible without opening a new section. This app should run all day on a pc in a small window in the bottom right corner of the screen. (250x300)

  8. #8
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,165
    Blog Entries
    22
    You can do that in a canvas section.

    Drop a textbox on the canvas.

    Add a data bound grid to the table that contains the log of clocking in.

    in the changed delegate for the textbox filter the grid contents.

    What is it you don’t understand?
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

  9. #9
    I have the canvas section with the badge and name fields. I have the treegrid in place. I don't know how to apply the data to the treegrid. I am using a select statement to get the data i want once the badge number is found in the employee file.

  10. #10
    Lianja Development Team barrymavin's Avatar
    Join Date
    Feb 2012
    Location
    UK, USA, Thailand
    Posts
    7,165
    Blog Entries
    22
    Use the addItems method()

    https://www.lianja.com/doc/index.php/Tree
    Last edited by barrymavin; 2023-09-26 at 11:22.
    Principal developer of Lianja, Recital and other products

    Follow me on:

    Twitter: http://twitter.com/lianjaInc
    Facebook: http://www.facebook.com/LianjaInc
    LinkedIn: http://www.linkedin.com/in/barrymavin

Bookmarks

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
  •  
Journey into the Cloud
Join us