How do I make use of a formfield array as an enum within a table. #258
-
In my form I have an api call that returns a list of objects (storage systems), each storage system object contains a list of pools. Based on system selection within the main form I can have a form field for selecting pools as follows: fields:
fnArray.from([{"name":"Pool1","oversubscription":123,"poolId":"1"},{"name":"Pool2","oversubscription":125,"poolId":"2"}]) This works in the main form; however, I want to move this pool selection inside a table so the pool can be selected for each item I create within the table. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
https://ansibleforms.com/tablefield/#enum_from You need to reference an expression from the mainform using "from" property |
Beta Was this translation helpful? Give feedback.
-
I have tried the following and it still shows "Loading..." I can see the expression value as an array in the main form as hide is not set to true. fields:
What am I doing wrong? |
Beta Was this translation helpful? Give feedback.
-
Sorted. I thought I had tried every option, however. name: pool_id Fixed it.. |
Beta Was this translation helpful? Give feedback.
Sorted. I thought I had tried every option, however.
name: pool_id
label: Storage Pool Selection pools
type: enum
from: pools
required: true
Fixed it..