Jump to content

Nitish

Members
  • Posts

    6
  • Joined

  • Last visited

Posts posted by Nitish

  1. I was able to package the attahced file into an addon. So, the user can open the addon, and search for signals using a customised search. The user can then click on one  of the signals. This signal shows up in the users worksheet. 

    But, it removes all the old signals that the user had already selected, and which were on the users list. 

    How do I retain the old signals while adding the new one to the list? 

     

    SearchWidget.ipynb

  2. Thanks Chris. I'll try this.

    Next thing I'll need is, when a user clicks on a search result, I should add it to the list of signals in the worksheet. 

    Can you please let me know where I can see the code for the SeeqItemSelect widget? 

    Otherwise, please give me the function which handles the onClick event on the search results. 

  3. Hi Kristopher,

    I am using SeeQ version 190.3

    You are right, I checked and found that the code runs without errors now.

    What I wanted to do was to have my own search function run when the users clicks the Search button. But I don't see any events in the documentation. Question is - is it possible to do a custom search using this widget? 

    I do have another plugin now using ipyvuetify which basically does the same thing, so it's ok if this is not possible. 

  4. I am trying to create a SeeQ addon to search by a property which the existing Search does not allow to search by. 

    This code displays the search widget. 

    item_selector = spy.widgets.SeeqItemSelect(
        '<H2>Tag Search by UID</H2>',
        show_fields = ['Name'],
        item_type = 'Signal',
        results_box_rows = 15, 
        max_displayed_results = 20
    )
    
    display(item_selector)

    When I enter a search term, and click the Search button, I am able to run this code to search for the results. 

    # Actions 
    def searchTagByUid(uid):
        results = spy.search({
                'Data ID': uid
            }, 
            all_properties = True
        )
        
    
    if "Name" in item_selector.search_terms:
        results = searchTagByUid(item_selector.search_terms['Name'])
        item_selector.search_results = results

     

    But, on the last line, where I try to actually display the results in the Search results part of the widget, I get an error. 

    AttributeError: can't set attribute
    
    Error found at line 12 in cell 44.

     

    Is there anything I can do to actually display the results from my search query in the search results box? 

     

×
×
  • Create New...