WILCO
  • 👩‍🎓User Manual
    • USER MANUAL
      • welcome page
        • create an account
        • login
          • login troubleshooting
        • logout
      • landing page
      • fleet dashboards
        • URL
        • fleet header
        • fleet
        • current alerts
        • map
      • aircraft timeline
        • overview
        • timeline header
          • calendar
          • warnings
          • show cleared
          • show hidden
        • tags
        • custom message
      • dashboards
        • overview
        • header
        • dashboard
        • parameters
          • search parameter
          • plot graph
          • trend chart
      • open a ticket
    • DESIGNER USER MANUAL
      • Manual post
        • copy text
        • upload file
          • CSV insertion
          • elasticsearch aggregation
      • Edit layouts
        • type of layouts
        • manage layouts and uplinks
        • create layout
          • report parser
          • web connector
        • IFT at Layout
      • Edit Fault codes
        • IFT at Fault Code
      • Edit parameters
        • IFT at Parameter
      • Edit Dashboards
        • create new dashboard
        • edit dashboard
        • Dashboards
          • Dashboard drawing tips
            • Illustrator
          • Dashboard rules
            • Libraries
            • Variables
            • Utils
            • Debugging the rules
            • Graphs
              • creation of the graph
              • Set the title of the graph
              • draw some zones
              • draw a serie (curve)
              • draw horizontal line
              • draw vertical line
              • draw circles
              • Example
            • WILCO.alertWarning
              • WILCO.alertInfo
            • WILCO.alertError
            • WILCO.api
            • WILCO.user
            • WILCO.getEventsForFwot
            • WILCO.getEventsForFwotMinMaxDate
            • WILCO.getSamplesForFwot
            • WILCO.getSamplesForFwotMinMaxDate
            • WILCO.getSampleTableForFwot
            • WILCO.getSamplesTableForFwotMinMaxDate
            • WILCO.getEventsStats
            • WILCO.dsv
            • WILCO.uplink
      • Edit Trends
        • create new trend
        • edit trend
        • Trends
          • Use the tags
          • Access to the surrounding values
      • Edit IFTs
        • edit IFT
        • create an IFT
        • IFT V2
          • moment
          • underscore
          • current Fwot
          • Samples
          • FW.api
          • FW.getWilcoUrls
          • FW.http
          • FW.getEvent
          • FW.getOtherEvent
          • FW.getEvents
          • FW.getFwot
          • FW.getFwots
          • FW.notify <deprecated>
          • FW.notifyWithTemplate <deprecated>
          • FW.email
          • FW.setFrom
          • FW.setTo
          • FW.setTitle
          • FW.setVisible
          • FW.setSeverity
          • FW.setComputedDate
          • FW.setStyle
          • FW.getSamples
          • FW.report
          • FW.reportInfo
          • FW.reportWarn
          • FW.reportFault
          • FW.reportError
          • FW.log
          • FW.updateProperties
          • FW.setFlightStatus
          • FW.setLoc
          • FW.uplink
          • FW.set
          • FW.updateSomeFwotProperty
          • FW.updateFwotProperty
          • FW.removeFwotProperty
          • FW.removeSomeFwotProperty
          • FW.tag
          • FW.untag
          • FW.postEvent
          • FW.reportFaultCode
          • FW.querySamples
          • FW.getRaw
          • FW.getBit
          • FW.csv
          • FW.machineLearningPredict
          • FW.webhook
          • FW.getPlugins()
          • FW.json
      • Show Uplinks
      • General Conf
        • Assets
          • Fwots
        • Configuration
          • Constants
          • Docs
          • Event tables
            • Tables
              • JSON structure
                • Title
                • filters
                • cols
                  • Fields of a column
                • Example
      • examples
        • flow of the data
        • use Constants
        • use Doc
        • use EventTable
        • use algorithm on trends
      • Code snippets
        • Get the last UPLINK message with filters
        • Automatically handle faultcodes according to a doc and a regex
        • Get the current airport
        • goto a page from a dashboard
        • get the samples and events over the 3 last legs
        • Webhooks: Get data from typeform and post it to ELK
        • Download a file from a SVG click
        • Clone a SVG template with D3
        • Cheat sheet
    • ADMIN USER MANUAL
      • General Conf
        • Access rights
          • API keys
          • Users
        • Assets
          • Airlines
          • Fwot types
          • Fwots
        • Configuration
          • App configs
            • UPLINK_ROUTING
            • SEND_MAIL
            • DO_UPLINK
            • UPLINK_PATH
            • MAX_DAYS_WITHOUT_EVENTS
            • ACARS_RECIPIENT
            • MAIL_TEMPLATE
            • USE_CURRENT_DATE
            • DO_UPLINK_AUTOMATIC_BLACKLIST
            • DO_UPLINK_MANUAL_BLACKLIST
            • UPLINK_EXPIRATION_MINUTES
          • Bookmarks
          • Constants
          • Docs
          • Event tables
          • Plugins
        • Swiss knife
      • Edit Plugins
        • Commit plugin
        • Deploy plugin
    • Q&A
  • 🔌Plugins
    • fw.ata49
      • Minimum requirements
      • Configuration
    • fw.fuelsave
      • Minimum requirements
      • Configuration
    • fw.opticooling
      • Minimum requirements
      • Configuration
    • fw.taxi
      • Minimum requirements
      • Configuration
    • fw.turnaround
Powered by GitBook
On this page
  • await FW.set([sampleV3IO])
  • await FW.set(param, value, timestamp, onlyIfChanged, eventId)

Was this helpful?

  1. User Manual
  2. DESIGNER USER MANUAL
  3. Edit IFTs
  4. IFT V2

FW.set

FW.set(param, value, timestamp, onlyIfChanged, eventId) or FW.set([sampleV3IO])

PreviousFW.uplinkNextFW.updateSomeFwotProperty

Last updated 2 years ago

Was this helpful?

await FW.set([sampleV3IO])

You can batch create a set of samples with a single call, by passing an array of samples. This way, you have a better flexibility on other fields of the sample such as the timelabel

The passed samples have to comply with the with some additional parameters to control the way it is inserted:

  • onlyIfChanged is an option that makes it possible to create the sample only when the value has changed compared to the previous value. It is useful when you want to log upfronts or downfronts

If you do not specify a msgId, the current event is used. If you do not pass a date, then the computedDate of the current event is used

await FW.set(param, value, timestamp, onlyIfChanged, eventId)

creates a sample for the passed parameter. if timestamp is not passed, then the event timestamp is used

  • param is a string and is the name of the parameter that will be created. If the parametre does not exists, it will be created on the fly

  • value is the value of the parameter. It can be a number, a string or an object. If the parameter does not exists yet, then it is creates on the fly with the corresponding type

  • The timestamp has to be in the format: "yyyy-MM-dd'T'HH:mm:ss" or a date or a moment or any ISO9001 format. if timestamp is not passed, then the event timestamp is used

  • onlyIfChanged is an option that makes it possible to create the sample only when the value has changed compared to the previous value. It is useful when you want to log upfronts or downfronts

  • eventId is optional. If not set, the sample is added to the current EVT. if the eventId is passed, the sample is added to the specified eventId

Note that if the sample is added to an other eventId, then the IFTs of the other event (eventId) will not be evaluated again.

    const d = moment.utc(FW.getEvent().computedDate);
    await FW.set('__SNAPSHOT', 'PREV', moment(d).add(-1, 'seconds'));
    await FW.set('__SNAPSHOT', 'MES1');
    await FW.set('__SNAPSHOT', 'MES2', moment(d).add(1, 'seconds'));
    await FW.set('__SNAPSHOT', 'NOLOAD', moment(d).add(2, 'seconds'));
👩‍🎓
SampleV3IO definition