Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Find specific records in a SwfTreeView on different node levels
#1
Not Solved Question 
Hi guys, I have some hard time figuring out how to select specific items in a dynamic SwfTreeView. So next are the details:

The tree looks like here:
   

- every element inside it has a checkbox (all parents and childs)
- the child items are dynamically generated (sometimes there could be no childs under some of the parents)
- parent items are always same
- 1st & 2nd parents have the Expand/Collapse function as they have child items (but might not have sometimes)
- 3rd parent does not have an Expand/Collapse functionality as it has no child elements (but might have sometimes)

The issue is that I need to build a function which has 2 input parameters (e.g. docType [the parents] & docName [the childs]).
Now I need the function to be smart enough in order to handle next cases (also the case when a parent node does not have childs - it should be ignored & reported and if randomizer was used to generate it then re-do (randomize so only a correct/existent parent is chosen and one which actually has childs):

Code:
Public Function Fn_PrintDocuments(docType, docName)
    
    '1. case where both parameters have a values
    If docType <> "" and docName <> "" Then
        'find docType & docName
        
        'check the item
        
    '2. case where docType parameters has no value but docName has a value
    ElseIf docType = "" and docName <> "" Then
        'find docName
        
        'retrieve it's docType
        
        'check the item
        
    '3. case where docType parameters has a value but docName has no value
    ElseIf docType <> "" and docName = "" Then
        'find docType
        
        'randmomize docName's of actual docType
        
        'check the random docType
        
    '4. case where both parameters have no values
    ElseIf docType = "" and docName = "" Then
        'randomize docType
        
        'find the docNames of randomized docType
        
        'randomize docNames
        
        'check randomized docName of randomized docType
        
    '*. not sure if there is another case - added the handler just in case something comes up later
    Else
        Reporter.ReportEvent micWarning, "'Fn_PrintFITDocumentOnInformationScr' - another case found", ""
    End If
 
End Function

Suggestions? I've been fighting it the hole day and found different ways online but neither worked for me as I could not fully complete the work.

Thank you.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Best method to use for automating 1000 records shuhale 0 1,065 07-21-2021, 11:42 PM
Last Post: shuhale
  Click on calender on specific date. venkatesh9032 1 3,858 12-02-2015, 07:30 PM
Last Post: nistalaramesh
  Fetching total number of records inside a webtable vidya2k2 2 3,836 06-15-2015, 02:55 PM
Last Post: venkatesh9032
  Selecting child node from Wintree object ajith123 2 5,283 02-26-2014, 02:12 AM
Last Post: supputuri
  VB SCRIPT to click on specific links on webpage and store related data ACCBAJPA 1 9,983 04-02-2013, 01:33 PM
Last Post: ACCBAJPA

Forum Jump:


Users browsing this thread: 1 Guest(s)