True/false not identified as inversible

What’s going on with this true/false formula that keeps it from being “inversible”?

the IS_IN_ARRAY_BY_KEY is exactly that: it returns a true or false according to whether an object with the given key-value is present or not in the list.

Hi

try the following:

IS_IN_ARRAY_BY_KEY(......) == true

Nope. Still has the warning, and the “save” button is still disabled.

Well,
The logic is when the value is false, you can click the button but when the value is true you can not click it. As in below, you can click it.
image

Does the below formula work for you?

!(IS_IN_ARRAY_BY_KEY(......) == true)

nope…

news flash:

It seems it’s not the formula, but possibly the binding itself… it cannot bind to any formula!

This is a repeatable checkbox, built from a list of objects in an app variable. I’m wondering if being repeatable is the root of the issue?

1 Like

I am also getting this error.
anyone can please advise

Hi all! The inputs have to be bound to something the value of which they know how to change or “invert” → that’s why “inversible formula”.

If you have a formula IS_IN_ARRAY_BY_KEY() or SUM_BY_KEY() bound directly to the input, it won’t know how to update the source value when you tick/untick a checkbox or input, because it’s based on a function that doesn’t have access to edit the original array where the information comes from.

To work with arrays and inputs I would suggest to have a “helper object” or list of objects i.e. [{id: 1, selected: false, amount: 5}, {id: 2, selected: true, amount: 2}] for example in a page variable – these values can be bound directly to the inputs, and then you can use logic outside of the inputs to set the values of the variable using formulas.

Hope this helps!

use icon instead of checkbox or toggle

  1. create app/page variable where you store your “id” ex. (pageVars.selected_id)
  2. every time you select one of the list you stored the “id” to app/page variable you created in step 1
  3. go to icon you place in the list and select icon name
    image

select Formula
image

and code like this

IF(pageVars.selected_id==repeated.current.id,“check-circle”,“check-circle-o”)

I’m just trying a basic SUM of two input field, already bounded to two different page variables, but I can’t quite understand the logic or what do I have to do to make it Inversible. Can you help me understand it ?, thank you :pray:

Hi @Juan_Juarez, create a third page variable containing the sum (you can use “Set page variable” flow for this) that you then bind to the input.

What happens in different scenarios:

Page var binding
Page var value is 3 → input changes to 6 → page var changes to 6 → inversible

Formula binding
SUM(pageVars.a+pageVars.b) = 3 → input changes to 6 → pageVars.a=? pageVars.b=? → not inversible

Hope this helps!

Not sure if this is what I was supposed to do, but it worked :blush:

Thank you so much @Mari :pray:t2:

1 Like