Starfinder Playlist
  1. #1

    Help On Windowlist Filtering (I Think)

    Hi All,

    Some coding help please:

    1) I've got a three column array of Items and I want to display column1 in a list. The array does not exists within the DB but is constructed from code eg the SkillData Array from the 3rd Ed DnD Ruleset. I think I can use a windowlist construct to do this, but an example would be helpful.

    2) I need to filter the list on two of the array's coulmns based on the user input from three controls contained within the parent window. This will allow me to set up a series of and/or conditions ie if control1 filters column2 and control2 and control3 both filter column3 in an "or" situtation ie I acheive a filter of control1.getValue() and (control2.getvalue() or control3.getvale()) - but I'm not sure how to code the filter in the windowlist, so again, an example would be much appreicated.

    Thanks in advance
    Dulux-Oz

    √(-1) 2^3 Σ Π
    ...And it was Delicious!


    Alpha-Geek
    ICT Professional
    GMing Since 1982
    NSW, Australia, UTC +10
    LinkedIn Profile: www.linkedin.com/in/mjblack

    Watch our games on Twitch: www.twitch.tv/dulux_oz

    Support Me on Patreon: www.patreon.com/duluxoz

    Past Games, etc, on my YouTube Channel: www.youtube.com/c/duluxoz

  2. #2
    1) I'm not sure that I follow what you are trying to do here. Windowlists can be source-less (i.e. not tied to the database), just leave off the datasource tag. Then, you can use createWindow to create a window using the default class defined by the windowlist.class tag, or createWindowWithClass to create a window using any class.

    2) The onFilter event is called for each child window when the filter is applied to a list. The filter can be applied by calling the windowlist.applyFilter function. The windowinstance object for the child window is passed to the onFilter event, so you can compare the specific child fields to your filter fields using any Lua code you want.

    Regards,
    JPG

  3. #3
    Thanks JPG - that's what I thought (just needed someone to confirm my thinking wasn't going astray)
    Dulux-Oz

    √(-1) 2^3 Σ Π
    ...And it was Delicious!


    Alpha-Geek
    ICT Professional
    GMing Since 1982
    NSW, Australia, UTC +10
    LinkedIn Profile: www.linkedin.com/in/mjblack

    Watch our games on Twitch: www.twitch.tv/dulux_oz

    Support Me on Patreon: www.patreon.com/duluxoz

    Past Games, etc, on my YouTube Channel: www.youtube.com/c/duluxoz

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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
  •  
FG Spreadshirt Swag

Log in

Log in