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
  • AppBuilder 5+: Update 5.15.1

    Add clock, battery percentage to header/footer.
  • Former Member
    Former Member over 6 years ago
    Found a small bug with the formula to code web app, seems negative values inside IF gives an error

    So for example

    SETV(3, IF(GETGLOBAL(1) LT -1.5, Power, Null))

    returns

    Error: Internal Error: InvalidCharacterError: Failed to execute 'btoa' on 'Window': The string to be encoded contains characters outside of the Latin1 range.

    The formula itself apparently works just fine, but I can only convert to code if I remove the "-" sign.
  • JTH9 that is certainly an annoying bug. Thanks for the bug report - I know exactly what the problem is now. Not sure when I’ll fix this, but for now you can work around it by substituting -1 * 1.5 for -1.5.

    btw, the problem is with negative values with a decimal point. Negative integers are fine.
  • Former Member
    Former Member over 6 years ago
    Hmm, seems it happens even with negative integers.

    Anyway I found a workaround with SETGLOBAL. I set the variable state on one field as text formula with negative values and can this way keep the other fields with bigger formulas as code.
  • JTH9 Okay, so it's not what I thought <_<.

    The web app is fixed now. Thanks for report.
  • Former Member
    Former Member over 6 years ago
    Seems I also found a bug with LAPRECORD

    I have RECORDSUMMARY and LAPRECORD in fields 1, 2, 4 and 6

    Seems summaries are recorded correctly with corresponding field names, but laps are only recorded for fields 1, 4 and 6. The field names are wrong too, displayed as 1, 3 and 5.

    So seems field 2 is missing for LAPRECORD and probably that's why the field numbering goes off too for rest of the fields.

    Otherwise the first test was successful so far with uphill / flat / downhill power.
  • Former Member
    Former Member over 6 years ago
    Another bug, if I convert formula that records with nativenum and/or fitlabel to code, for example:

    RECORDSUMMARY(AVG(Power),20) ; RECORDLAP(LAPAVG(Power),19) ; RECORD(Power,7,"Power")

    Data is recorded, but nativenum/fitlabel doesn't work so power is not recognized. Works fine as text formula though. Seems to happen with both AppBuilder5 and AppBuilder5+.
  • Former Member
    Former Member over 6 years ago
    Despite the small bugs I finally got a working setup so I could record my performance and monitor it real time. Too bad Garmin Connect is now down for maintenance (what a timing) so the run data will have to wait for later. Anyway it was great to finally run seeing all 3 aspects of power and adjust performance accordingly. At first I noticed my uphill power was rising so I took it easier on uphills. Then I had more juice towards the end to go faster on the flat and downs. In the end there was only 1 - 2 watt difference with any of the 3 numbers.

    I've achieved similar performance in past but it really takes more focus as real time power is quite variable so you don't really know how much exactly you've worked uphill / downhill. Then there is also the lag caused by gradient calculation, so it's difficult sometimes to know what Stryd thinks is your current power. Sometimes you still see low/high power even when you're past the hill. This is why on shorter ups and downs it's best to go by feel and focus on power when there is a longer hill ahead.

    I also added a + and - sign to real time power (flat power without sign) to see which part you are working towards to. :) It's worth noting though that the gradient calculation comes from Garmin altimeter. So it doesn't always react the exact same second as Stryd power. I still think it's close enough to be useful. At least based on this first test run.

    I will add the formulas and run data later, when GC is up and running again. I think I'm going to use this on a few more runs now so it will become my main workout screen. Shorter and faster interval laps will also be interesting to test.
  • Update 5.16: AppBuilder 5+

    - FIT field: Fix missing lap record for metric 2 in Garmin Connect. Existing files should be displayed properly now.
    - Fix overriding of internal FIT label, from code

    ---
    AppBuilder 5:

    I started to update AppBuilder 5 in the store, then I remembered that I didn't actually make any changes to it. >_>. So only one of four clones has been updated, but there's really nothing new.

    AppBuilder 5 should already work with overriding the internal FIT label from code. If not, let me know.
  • As a side note, I am starting to reuse as much code as possible across all of these overlapping projects: Run Power, AppBuilder 5, and AppBuilder 5+. So there will be less chance in the future of seeing this kind of bug in one app but not the other. AppBuilder 5 still has some redundantly duplicated code, due to its legacy of being initially developed for very small memory devices.