# Smart Action field of type array reference collection

**URL:** <https://community.forestadmin.com/t/smart-action-field-of-type-array-reference-collection/3013>\
**Category:** Help me!\
**Created:** [July 29, 2021, 10:59am UTC](https://community.forestadmin.com/t/smart-action-field-of-type-array-reference-collection/3013 "2021-07-29T10:59:17Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![MilenDyankov](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/milendyankov/32/2760_2.png) [@MilenDyankov](https://community.forestadmin.com/u/MilenDyankov)\
**Post date:** [July 29, 2021, 10:59am UTC](https://community.forestadmin.com/t/smart-action-field-of-type-array-reference-collection/3013/1 "2021-07-29T10:59:17Z")

</div>

I have defined a smart action like this:

```javascript
        name: 'Promote',
        type: 'global',
        fields: [
            {
                field: 'Member(s)',
                description: 'Who gets promoted',
                type: ['Number'],
                isRequired: true,
                reference: 'member.id'
            }
        ]

```

## Expected behavior

A form is displayed where I can look for (typeahead style) and add multiple records of the `member` table and then execute the action on them.

## Actual behavior

The Smart Action’s UI is grayed out:

 ![image](https://europe1.discourse-cdn.com/flex013/uploads/forest/original/2X/1/13c576179914ecb8562d022d6574dfeb7aaec7c0.png)

## Failure Logs

Nothing in the backend log. The browser console shows:

```javascript
Uncaught TypeError: Cannot read property 'widget' of null
    at i.get (client-e4243d4be60ed551239a4afced006ce1.js:13852)
    at vendor-c07624b566e0c950b81e97ff61b6e54f.js:2679
    at e.untrack (vendor-c07624b566e0c950b81e97ff61b6e54f.js:5121)
    at i.o.get (vendor-c07624b566e0c950b81e97ff61b6e54f.js:2679)
    at i.currentEditWidget (vendor-c07624b566e0c950b81e97ff61b6e54f.js:2638)
    at i.get (client-e4243d4be60ed551239a4afced006ce1.js:13854)
    at vendor-c07624b566e0c950b81e97ff61b6e54f.js:2679
    at e.untrack (vendor-c07624b566e0c950b81e97ff61b6e54f.js:5121)
    at i.o.get (vendor-c07624b566e0c950b81e97ff61b6e54f.js:2679)
    at i.componentName (vendor-c07624b566e0c950b81e97ff61b6e54f.js:2638)
    at _e (vendor-c07624b566e0c950b81e97ff61b6e54f.js:2655)
    at e.ye [as getPath] (vendor-c07624b566e0c950b81e97ff61b6e54f.js:2654)
    at vendor-c07624b566e0c950b81e97ff61b6e54f.js:4368
    at e.track (vendor-c07624b566e0c950b81e97ff61b6e54f.js:5119)
    at e.t.value (vendor-c07624b566e0c950b81e97ff61b6e54f.js:4368)
    at e.t.initialize (vendor-c07624b566e0c950b81e97ff61b6e54f.js:4337)
    at e.t.peek (vendor-c07624b566e0c950b81e97ff61b6e54f.js:4333)
    at Object.evaluate (vendor-c07624b566e0c950b81e97ff61b6e54f.js:4696)
    at e.t.evaluate (vendor-c07624b566e0c950b81e97ff61b6e54f.js:4629)
    at e.t.evaluateSyscall (vendor-c07624b566e0c950b81e97ff61b6e54f.js:4900)
    at e.t.evaluateInner (vendor-c07624b566e0c950b81e97ff61b6e54f.js:4894)
    at e.t.evaluateOuter (vendor-c07624b566e0c950b81e97ff61b6e54f.js:4894)
    at r.next (vendor-c07624b566e0c950b81e97ff61b6e54f.js:4997)
    at r.execute (vendor-c07624b566e0c950b81e97ff61b6e54f.js:4996)
    at n.r.handleException (vendor-c07624b566e0c950b81e97ff61b6e54f.js:4915)
    at e.t.handleException (vendor-c07624b566e0c950b81e97ff61b6e54f.js:4942)
    at e.r.throw (vendor-c07624b566e0c950b81e97ff61b6e54f.js:4904)
    at n.evaluate (vendor-c07624b566e0c950b81e97ff61b6e54f.js:4701)
    at e.r.execute (vendor-c07624b566e0c950b81e97ff61b6e54f.js:4904)
    at e.t.rerender (vendor-c07624b566e0c950b81e97ff61b6e54f.js:4945)
    at e.l.render (vendor-c07624b566e0c950b81e97ff61b6e54f.js:2426)
    at vendor-c07624b566e0c950b81e97ff61b6e54f.js:2454
    at e.inTransaction (vendor-c07624b566e0c950b81e97ff61b6e54f.js:4410)
    at n.i._renderRoots (vendor-c07624b566e0c950b81e97ff61b6e54f.js:2453)
    at n.i._renderRootsTransaction (vendor-c07624b566e0c950b81e97ff61b6e54f.js:2458)
    at n.i._revalidate (vendor-c07624b566e0c950b81e97ff61b6e54f.js:2458)
    at t.invoke (vendor-c07624b566e0c950b81e97ff61b6e54f.js:5286)
    at e.t.flush (vendor-c07624b566e0c950b81e97ff61b6e54f.js:5278)
    at e.t.flush (vendor-c07624b566e0c950b81e97ff61b6e54f.js:5292)
    at e.n._end (vendor-c07624b566e0c950b81e97ff61b6e54f.js:5355)
    at e.n.end (vendor-c07624b566e0c950b81e97ff61b6e54f.js:5311)
    at e.n._run (vendor-c07624b566e0c950b81e97ff61b6e54f.js:5357)
    at e.n._join (vendor-c07624b566e0c950b81e97ff61b6e54f.js:5356)
    at e.n.join (vendor-c07624b566e0c950b81e97ff61b6e54f.js:5322)
    at h (vendor-c07624b566e0c950b81e97ff61b6e54f.js:3927)
    at vendor-c07624b566e0c950b81e97ff61b6e54f.js:3627
    at a (vendor-c07624b566e0c950b81e97ff61b6e54f.js:3845)
    at Object.handleEvent (vendor-c07624b566e0c950b81e97ff61b6e54f.js:3627)
    at p.handleEvent (vendor-c07624b566e0c950b81e97ff61b6e54f.js:3552)
    at HTMLLIElement.<anonymous> (vendor-c07624b566e0c950b81e97ff61b6e54f.js:3577)

```

## Context

- If I remove `reference: 'member.id'`, it works, but then I cannot look for members. I have to know their ids.

- If I change the type to `type: 'Number'` _(not an array)_, it works, but I can look for only one record at a time.

It’s the combination of the two that does not work.

---

<div class="post-metadata">

**Author:** ![Guillaume\_Cisco](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaume_cisco/32/918_2.png) [@Guillaume\_Cisco](https://community.forestadmin.com/u/Guillaume_Cisco)\
**Post date:** [July 29, 2021, 12:47pm UTC](https://community.forestadmin.com/t/smart-action-field-of-type-array-reference-collection/3013/2 "2021-07-29T12:47:05Z")

</div>

Hello @MilenDyankov,

Indeed this is an issue. Nice catch!  
Our team is on it and we are still investigating.

I will let you know when we have a solution 😃

---

<div class="post-metadata">

**Author:** ![Guillaume\_Cisco](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaume_cisco/32/918_2.png) [@Guillaume\_Cisco](https://community.forestadmin.com/u/Guillaume_Cisco)\
**Post date:** [July 29, 2021, 2:37pm UTC](https://community.forestadmin.com/t/smart-action-field-of-type-array-reference-collection/3013/3 "2021-07-29T14:37:54Z")

</div>

Hi @MilenDyankov,

Unfortunately, hasMany relations are not supported yet in smart action form 😢  
However we will try our best for fixing the issue on our frontend and warn development mistakes.

This requested feature has been pushed to our product board.

---

<div class="post-metadata">

**Author:** ![MilenDyankov](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/milendyankov/32/2760_2.png) [@MilenDyankov](https://community.forestadmin.com/u/MilenDyankov)\
**Post date:** [July 30, 2021, 9:28am UTC](https://community.forestadmin.com/t/smart-action-field-of-type-array-reference-collection/3013/4 "2021-07-30T09:28:37Z")

</div>

Thank you @Guillaume_Cisco

Can I track the progress somewhere?  
Is the product board publicly available? I’m asking as I may have some other suggestions about UI improvements, and I’m not sure where to post them.

---

<div class="post-metadata">

**Author:** ![Guillaume\_Cisco](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/guillaume_cisco/32/918_2.png) [@Guillaume\_Cisco](https://community.forestadmin.com/u/Guillaume_Cisco)\
**Post date:** [July 30, 2021, 9:48am UTC](https://community.forestadmin.com/t/smart-action-field-of-type-array-reference-collection/3013/5 "2021-07-30T09:48:42Z")

</div>

Hello @MilenDyankov,

Unfortunately, our product board is private.  
You can however open new tickets for telling us about new awesome features requests 🚀

---

<div class="post-metadata">

**Author:** ![umaprasath](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/umaprasath/32/2934_2.png) [@umaprasath](https://community.forestadmin.com/u/umaprasath)\
**Post date:** [August 26, 2021, 12:46am UTC](https://community.forestadmin.com/t/smart-action-field-of-type-array-reference-collection/3013/6 "2021-08-26T00:46:06Z")

</div>

Hi,  
I am facing the same issue as well and looking for a solution. Please help !!

---

<div class="post-metadata">

**Author:** ![Sliman\_Medini](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/sliman_medini/32/19_2.png) [@Sliman\_Medini](https://community.forestadmin.com/u/Sliman_Medini)\
**Post date:** [August 26, 2021, 7:43am UTC](https://community.forestadmin.com/t/smart-action-field-of-type-array-reference-collection/3013/7 "2021-08-26T07:43:17Z")

</div>

Hi @umaprasath,

Smart action forms features are still in progress.  
I am adding your request to our product board ticket in order to increase its weight.

Regards

---

<div class="post-metadata">

**Author:** ![Paul\_Vidal](https://dub1.discourse-cdn.com/flex013/user_avatar/community.forestadmin.com/paul_vidal/32/2897_2.png) [@Paul\_Vidal](https://community.forestadmin.com/u/Paul_Vidal)\
**Post date:** [September 24, 2021, 4:47pm UTC](https://community.forestadmin.com/t/smart-action-field-of-type-array-reference-collection/3013/8 "2021-09-24T16:47:56Z")

</div>

> [@Sliman\_Medini](#):
>
> Smart action forms features are still in progress.

Hey there 🙂 Same, this is a really important feature, I’m surprised it is still not supported ☹ Thanks for putting efforts into it though !

---

<div class="post-metadata">

**Author:** ![anon39848301](https://avatars.discourse-cdn.com/v4/letter/a/b9e5f3/32.png) [@anon39848301](https://community.forestadmin.com/u/anon39848301)\
**Post date:** [September 27, 2021, 10:22am UTC](https://community.forestadmin.com/t/smart-action-field-of-type-array-reference-collection/3013/9 "2021-09-27T10:22:36Z")

</div>

Hey @Paul_Vidal,

It has been logged to our product board. Be sure you’ll be updated once we starte/release this 👍  
Sadly, we cannot provide any ETA for logged product board feature.
