Retain state reset key and Reset key control

Hi all,

Was anyone able to put Reset key control to work? Do you know how it works?
Actually my first question is what retain state relates to? It is the result (or output) of a given control?

My intention is to set all results to “blank” when users go to a specific screen. In my case would be the first screen. I did try to put a Reset key control in the first screen and setup the Retain state reset key (the same in the Reset key control) of the controls I do not intend to be passed for the next record, but with low success.

Hope someone can help me,
best,

Retain state freezes the current choice. The Reset key must be activated on every control.
In my cases it works. May be it would be a good idea to share an CTX?

Cheers
Holger

Hi Holger,

Can you be more explicit on “the retain state freeze the current choice” please. In my case, the result of a given choice is passed to the next record unless a new choice is choosen. And I want to reset all controls to “blank” in the active record. Was that clear?

Thanks for your help,
Nuno

A quinta, 27/01/2022, 10:29, ctboardmanager <ctboardmanager@gmail.com> escreveu:

The content of an element will not be deleted (from my point of view). It is a function which I urgently need too.
I’m not sure if this was working before!?!?!

Holger

If someone creates a very small CTX example which includes what you are trying to do, I will take a look.

There is a discussion about how this works on Page 99 of the Controls Reference Manual:

Controls Reference Manual - CyberTracker Wiki

Cheers,

-Justin

https://www.dropbox.com/s/d6mmpapi5ta3n3q/check_reset_state.CTX?dl=0

I hope, it will work. Justin sorry, not all Elements are translated.

What I want to do is, makes a protocol an at the end I have two wishes:

  • save the data or
  • change current data (thats why “retain state”) and save after

My problem is the tree of species. When I follow the first choice. eg. cat->housecat and change at the last screen from housecat to lynx… it will work. But if I not follow the tree path, eg. dog-> housedog, the data contain two entries: species = housecat and specie = housedog.

My wish is to empty the element “Spezies” anyway.

Thanks
Holger

ohh… did you see the ctx? I try to explain it a little better.

There are some entries to make a track protocol: species, gait, measurements. All entries are saved in result elements. The result element of species tree is named “Species”. With “species tree” I mean mammals->dogs->housedog or mammals->cats->housecat. “Housedog” or “housecat” is saved in “Species” result element.

After the user filled all necessary in, he has two use cases:

  • save (finished) and
  • change before save (“change mode”).
  • Retain state is set at all screens with “Retain state reset key” = ResetData

  • Before pushing “ready?” you can see all retained entries => ok.

  • When you go in the tree of species again and takes a little other path than before, the element “Species” is seen twice, from the 1st path and from the 2nd path. => problem

=> Thats why I was searching for a solution to delete the content of result element “Species”.

For testings this I implement the last 3 screens . All contains “reset state key” control = ResetData and jumps to start (with and without save ).

Result:

  • It works fine for Gait and Measurements, because you go through the same screens again during “change mode”.
  • But it does not work for species tree and result “Species”. (“ResetData” deletes the choices in the screens of species, but not the element “Species” by itself.)

Any idea?
Holger

Yes, I saw the CTX, but it was so complex I could not understand the intent. Could you please share a one with the minimal possible number of screens?

ok Justin. I’m sorry. I have reduced my current appllication to less than 10%, but I understand that it will be hard for you.

I try it in another way: only one question:

Is it possible to delete double result elements like in the picture? I guess, not …

Cheers
Holger

Sorry, we don’t have a way to do that right now.

ok, I will find another way to solve my problem … Tnx, Justin