Action Framework: Create new row but also request info from user

  • 1
  • Question
  • Updated 4 years ago
  • Answered
I followed the awesome AF deep dive video here: https://community.skuidify.com/skuid/topics/deep-dive-skuid-actions-framework and at 20:38 it takes us through logging activities with one-click.  Absolutely love it.

I was then asked to allow our inside team to leave a quick blurb in the Description of the Task for what the voicemail was about.  How do we set a bunch of default values as demonstrated, but also have a pop up for the description field to show up as well?
  1. Create row in model
  2. Set default values
  3. Show pop to gather additional information and attach to row created above
  4. Save row and close pop up
How do we attack this?

Thanks
Photo of Joe Ort

Joe Ort

  • 2,256 Points 2k badge 2x thumb

Posted 4 years ago

  • 1
Photo of Joe Ort

Joe Ort

  • 2,256 Points 2k badge 2x thumb
I got it working.

You have to do 2 different steps here.  

First step when you click the row action populates the default values (as described in the video) and produces a pop up.
Second, have a field editor only show the fields you want populated by the rep from the same model.  Add a button to save the model and close the pop up.

I was trying to do everything in one and it wouldn't work.

They're going to love this.
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
Glad you got this working.  You are right about having to do this in chunks..  Makes it a little more complicated than we'd like,  but you've found your way through it. 
Photo of Joe Ort

Joe Ort

  • 2,256 Points 2k badge 2x thumb
During testing, I ran into an interesting display.  If I add a call/activity for one line item and then either try to log another task for the same or new line, I am presented with the following:



I have the NewTask model limited to 1 row and the "save and close" and "cancel" actions both save then cancel then query model to try and get it back to 0.

Why would the description pop up again?  When I save, it only inputs the first box's data anyway.  Ideas on how to clean this up?
Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
What we reccomend for creating new records in popups is to add a step to the beginning of your first set of actions:  "cancel model".  This will get rid of the prior items that are in the model but have not yet been saved.  (maybe someone clicked the x in the popup).   And then add a "query model" action on the end of the second set of actions.  This will clear out the model after the voicemail descriptions are entered and saved.

That should take care of you.  
Photo of Joe Ort

Joe Ort

  • 2,256 Points 2k badge 2x thumb
I've done that and even logged in as a new user and I'm seeing the Field Editor repeated when clicking on the action the first time

Photo of Rob Hatch

Rob Hatch, Official Rep

  • 44,006 Points 20k badge 2x thumb
In your model properties do you have the "Create row" property set.  If this is on,  you get a row at page load,  and then you get a second row in your action sequence. 
Photo of Joe Ort

Joe Ort

  • 2,256 Points 2k badge 2x thumb
That's not checked.  I tried cloning the model and making all references to the cloned model and it's still showing the blank second field editor.