Smart Action field of type array reference collection

I have defined a smart action like this:

        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:

Failure Logs

Nothing in the backend log. The browser console shows:

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.

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 :smiley:

Hi @MilenDyankov,

Unfortunately, hasMany relations are not supported yet in smart action form :cry:
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.

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.

Hello @MilenDyankov,

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

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

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

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

Hey @Paul_Vidal,

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