JavaScript API 5.3

Viewing 5 reply threads
  • Author
    Posts
  • May 31, 2020 at 5:49 PM #40748

    Rocky Machado
    Participant

    Hi Brendan – I have a couple of questions. Have the following methods been deprecated. form.getRecordsForSearchTerm() and record.setRecordColor() It doesn’t show up in the IntelliSense. Also, in the future will you being adding a feature to recalculate a form via the javascript API?

    Oh, I’m running version 5.3.11 (Build 962)

    thanks,
    rocky

    May 31, 2020 at 11:37 PM #40750

    Brendan
    Keymaster

    Hi Rocky,

    No, those haven’t been deprecated. In fact, I recently added the form.getRecordsForSearchTerm() function. The issue is I forgot to add those as keywords to the keywords file that tells the editor what functions to colour.

    For recalculating the form, just click the refresh button at the bottom of the record. Or at the bottom of the records list view.

    June 6, 2020 at 7:42 AM #40826

    Rocky Machado
    Participant

    Hi Brendan – Thanks, I am able to use them. I just wasn’t sure if they were being deprecated in the future. I have a question relating to form.getRecordsForSearchTerm(). Not sure if I am understanding the function correctly. In my Trades form, I have created a trade Id that is used to identifies a cycle of a trade (buy and sell). I noticed that when I use the entire key, I get no record results. Here is a sample of the Trade Id TSLA-2020-06-01-Butterfly:503 . However, If I use parts of the Trade Id I get results. (i.e Butterfly:503, TSLA or 2020-06-01). Is this the correct behavior of the function?

    thanks,
    rocky

    June 6, 2020 at 8:59 AM #40827

    Sam Moffatt
    Participant

    You’ll find a similar thing with the normal search when you use dashes, in the search box I have to wrap them with quotes to ensure it doesn’t break apart (e.g. for me to find N-100 I search for "N-100", so for you try "TSLA-2020-06-01-Butterfly:503"). Something to do with the search term tokenisation.

    June 6, 2020 at 7:56 PM #40831

    Brendan
    Keymaster

    Also the negative signs are used to specify a NOT condition. Like TSLA-2020 would mean give me all record that have TLSA in it, but NOT 2020. Google works this way too.

    June 7, 2020 at 11:26 AM #40836

    Rocky Machado
    Participant

    Thank You for the explanation. I went ahead and wrapped my search keys in quotes.

Viewing 5 reply threads

You must be logged in to reply to this topic.