Skip to main content
Solved

Other Tab Variant for form depending on grid column value


Forum|alt.badge.img+1

Is it possibe to to change the table variant on a form depending on a value of a column ( for instance category )  ?

I have a screen type where theres is a grid on first tab and form and details on second tab. 

i created table variants for some categories  where i have a different setup for the form

and its details. ( other group labels  , different field order )   

 

now when i have selected a record and go to the form tab it shows the default form  

but i woold like the formlayout of one of the defined table variants 

 

 

 

 

 

 

Best answer by Marco Maat

Solved it  by adding a table task that works on double clicking a record  in a grid only screen 

Task opens a variant according the category with screen with form and details.

But yours is interesting too

View original
Did this topic help you find an answer to your question?
This topic has been closed for comments

3 replies

Forum|alt.badge.img+17
  • Moderator
  • 765 replies
  • October 19, 2023

Not by default. But you can simulate this with a double self reference toggling between reference 1 or 2 using the context procedure. You can then assign a different table variant to the reference. The reference columns are expression columns see the input below. Below is an example: 
 


 



Ref1 expression column =  case when t1.category = 1 then t1.x_id else null end
Ref2 expression column =  case when t1.category = 1 then null else t1.x_id end

 

Context: 

 

  

if @reff1 is null
begin
 set @ref_X_X_ref1_type = 2
end

if @reff2 is null
begin
 set @ref_X_X_ref2_type = 2
end


Forum|alt.badge.img+1
  • Author
  • Sidekick
  • 11 replies
  • Answer
  • October 23, 2023

Solved it  by adding a table task that works on double clicking a record  in a grid only screen 

Task opens a variant according the category with screen with form and details.

But yours is interesting too


Forum|alt.badge.img+1
  • Author
  • Sidekick
  • 11 replies
  • October 23, 2023

 


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings