Skip to main content
Solved

Can I use a runtime variable to change the dataModelId of a knowledge model?

  • April 11, 2024
  • 1 reply
  • 9 views

michael.kaemp
Level 5
Forum|alt.badge.img

I'd like to create a component (dropdown or checkbox), to switch between two data models (let's call them "test", and "prod"), that have the same structure but contain different data.

I tried two ways:

  1. A runtime variable called "dm" holding the data model variable name. I used this in the knowledge model like this: dataModelId: §{{dm}}
  2. A runtime variable holding a boolean value (1 or 0) called "useProd". I used this like follows: dataModelId: §{{useProd==1?prod:test}}

Both ways didn't work. Did I just do it wrong or is it impossible?

Best answer by dennis.pflug

Hi Michael,

 

I think it is not possible as dataModelId: is expecting a data model variable and within a view you are only able to make changes to a runtime variable.

 

I like the idea and maybe someone else if having a good idea to cover this but I guess Celonis differentiates between data model variables and runtime variables on purpose. ;)

1 reply

dennis.pflug
Level 10
  • Level 10
  • Answer
  • April 11, 2024

Hi Michael,

 

I think it is not possible as dataModelId: is expecting a data model variable and within a view you are only able to make changes to a runtime variable.

 

I like the idea and maybe someone else if having a good idea to cover this but I guess Celonis differentiates between data model variables and runtime variables on purpose. ;)