Data Field: AppBuilder

By user request, this app lets you define your own data field, based on a simple math formula like cadence / 2.

If you want to get fancy, there's conditional expressions (like IF in Excel), functions for data analysis (like MIN and AVG), and the data field can also display the text of your choice. The resulting data can be (optionally) written to the activity FIT file.

With AppBuilder, you can implement almost any field that involves math, such as: calculating normalized power and saving the data to the FIT activity file, showing the average pace for even-numbered laps, or recording the amount of time you sprinted.

Full documentation and examples here:
http://ciq-appbuilder.blogspot.com/

AppBuilder 5:
Now with new features! AppBuilder 5 is a completely new app, so please check it out in the store if you are interested in any of the new features.
https://apps.garmin.com/en-US/apps/fd690281-9c22-4fee-a81e-3b7f39aa67c5

- Store up to four formulas per app. Switch between formulas directly on the watch, without using a phone or PC. With four clone apps, you can store up to 16 formulas total
- User variables. Allows for powerful formulas where information can be stored at one point, like the start of a lap, and used later. e.g. Lap elevation change
- Improved timeavg() options. Allows for simpler, more flexible normalized power function
- More functions and variables

4 clones of AppBuilder are available in the store, so you can have 2 formulas in the same activity
  • Update 5.5.5

    Fix embarrassing bug where text was converted to lowercase. Shouldn't have blamed that one on Garmin....
  • Added a "quick start" section to the docs. Yes, I realize this stuff is not simple.
    https://ciq-appbuilder.blogspot.com/p/quickstart.html
  • Thanks for sorting the case issue with the text display.

    I've been playing with the 20 Min max power formula and it works pretty well, its consistently been within 1-2 watfs of the value that Connect produces.

    The only issues I had was following a device crash, which on resume had cleared the avg power buffer and as a result the countdown timer was restarted but counted negatively because the activity timer was greater than 20min. Once a further 20 min elapsed it displayed the max power again though as expected the previous max power had been reset.
    Similarly if the power meter is not being used the timer counts to 0 then continues negatively indefinitely.

    Although probably not the most efficient way I tweaked the formula to give a bit more feedback & hopefully avoid the negative timers.

    SETV[1, MAX[TIMEAVG0[Power,1200,1,1]]]; SETV[IF[Timer GTE 1200 AND NOT[GETV[1]] AND ALT[GETV[2],0] + 1200 - ALT[Timer, 0] LTE 0, 2, null], Timer]; IF[PREV[Timer], IF[AVG[Power], IF[GETV[1], RECORD[FORMATNUMBER[GETV[1]]] + 'w', FORMATTIME[ALT[GETV[2],0] + 1200 - ALT[Timer, 0]]], 'No Power Data'], 'Start Timer']

    Some observations regarding the Record function.
    If I select RECORD[] for the value GC produces a graph & summary. However if I use the RECORDSUMMARY[] I get a summary, but also a blank graph.
    Also not your problem but GCM displays the Label given to the formula in the settings correctly however in GC the label field in blank.
  • No problem! Thanks for the feedback. I've also been informed that the text fonts are pretty much as big as they'll get, which is what I assumed anyway.

    If I select RECORD[] for the value GC produces a graph & summary. However if I use the RECORDSUMMARY[] I get a summary, but also a blank graph.
    Also not your problem but GCM displays the Label given to the formula in the settings correctly however in GC the label field in blank.


    Yes, GCM has a bug that's been around for a while....

    I can see how the thing with the blank graph is annoying. For boring historical reasons, I would always record the result of the formula to both the summary and and graph, even if that doesn't quite make sense. Since the result of formula is a string, you get a blank graph.

    I could (and probably should) change that now), but I don't know if I want to change behaviour that's been around since the beginning.
  • Update 5.5.6
    - Fix TIMEAVG crash on CIQ1 devices.

    Update 5.6
    -
    Build with latest CIQ SDK (3.0.5). Optimize code slightly. For CIQ3 devices, laps are now counted properly in workouts and multisport.

    CIQ1 devices: D2 Bravo (titanium), Fenix 3 (HR), Vivoactive, FR230, 235, 630, 920XT
    CIQ2 devices: Vivoactive HR, 735XT, Edge 520, Edge 1000
    CIQ3 devices: Anything not in the above list (some devices, such as Approach S60, are still waiting on the upgrade, though)


    Note to CIQ1 users: please let me know if the field crashes now with formulas that used to work. I'm seeing some increased peak memory usage, although the simulator doesn't crash for me. I don't have a real CIQ1 device anymore so I can't test it IRL

    ----

    - Added a few new examples

    Strength activity set counter
    lapcount div 2 + 1

    Power Zone [AppBuilder5]
    SETV(1, FINDGTE(Power, 240, 210, 180, 150, 110, 50, 0)) ; FINDLTINDEX(Power, 50, 110, 150, 180, 210, 240, 300) + (Power - GETV(1)) / (FINDLT(Power, 50, 110, 150, 180, 210, 240, 300) - GETV(1))

    Assuming your zones are:
    0 to 50
    50 to 110
    110 to 150
    150 to 180
    180 to 210
    210 to 240
    240 to 300

    Adjust as necessary for your actual power zones.
  • Update 5.6.1
    - Fix formula parsing on large-memory devices like Fenix 5X Plus
  • Update 5.6.2

    Add START(), LAPSTART(), for CIQ2

    e.g. Lap calories: Calories - LAPSTART(Calories)
    e.g. Elevation at start: START(Altitude)

    START(X), LAPSTART(X)
    Captures the first non-null value of X at the start of the activity or lap, respectively.

    Alternate form:
    START(X, considerNulls), LAPSTART(X, considerNulls)

    considerNulls (optional):
    0 (default) - ignore nulls (captures the first non-null value of X, even if it's 30 minutes into the lap/activity)
    1 - captures the first value of X, whether it's null or not

  • Added note to docs on text:

    When formatting/combining numbers with text, to get the largest possible numerical font, use only the following characters (no spaces or minus signs):
    0123456789:.

    e.g: Display HR and max HR in same field

    HR + ":" + Max(HR)

    It will look a little funny but the text will be as large as possible.
  • Hi. I just installed your AppBuilder datafield. Really cool...
    However, I got a problem: The label isn't shown anywhere in GC graphs and summaries (web, android, as well as iOS version). There appears only "Appbuilder5" (graph) and
    "AppBuilder 5 - Label IQ" as well as "AppBuilder 5 - IQ"(statistics section, GC web) .
  • Assoede thanks for the feedback! Hope you'll find it useful in some way.

    The label should be in the summary beside: "AppBuilder 5 - Label".

    There is a bug in the GC website right now where it will be displayed as 0, but I can confirm that it works on iOS.

    Unfortunately, the actual labels for the graph, summary and lap data for Connect IQ apps are fixed. So I can't display your label where you would expect to see it.