Skip to main content
Answer

Default procedure does not always clear a field

  • September 18, 2024
  • 4 replies
  • 127 views

Valentin
Apprentice
Forum|alt.badge.img+1

Hello!

I have a task with 3 dropdown fields (A, B and C).

I have a layout that switches between B and C’s visibility depending on whether A has a value or not. When the task is executed, either B or C’s value is inserted into the same column.

I also have a simple default that clears both B and C’s values when A’s value is changed or deleted. When you deselect the value on A with the “X” button on the right, the default functionality is inconsistent and does not always get cleared properly, sometimes leaving the lookup id behind in B or C. To me, it seem arbitrary whether or not it works. However, if you manually delete the value it behaves as expected.

Any idea about a fix or workaround? Thank you!

 

 

Best answer by Alexandra Egri

Hello, Valentin.

We need to investigate this furthermore. Could you create a ticket for this in TCP

This topic has been closed for replies.

4 replies

Mark Jongeling
Administrator
Forum|alt.badge.img+23

Hey Valentin,

Are you using the Universal GUI? Could you also share you Default logic code? Thanks!


Valentin
Apprentice
Forum|alt.badge.img+1
  • Author
  • Apprentice
  • September 19, 2024

Yes, I am using the Universal GUI. Here is the default in question. I have also tried null checks for field A, but with no luck so I left it at this.

-- field A
if @cursor_from_col_id = 'classification_id'
begin
-- field B
set @configuration_setup_next_question_id = null
-- field C
set @configuration_filtered_setup_next_question_id = null
end

Also, here is a screenshot of the lookup id that gets left behind after making field A null with the “X” button. And again, if I manually erase field A instead, it works as intended and makes both B and C null.
 


 


Alexandra Egri
Moderator
Forum|alt.badge.img
  • Moderator
  • Answer
  • September 19, 2024

Hello, Valentin.

We need to investigate this furthermore. Could you create a ticket for this in TCP


Valentin
Apprentice
Forum|alt.badge.img+1
  • Author
  • Apprentice
  • September 20, 2024

Hello Alexandra,

We did indeed create a ticket for it. Thank you!