Record owner of record created with QuickBase Actions

  • 0
  • 1
  • Question
  • Updated 9 months ago
  • Answered
I have setup an action using QuickBase actions, where adding a record in one table creates a record in another table. It appears that I (administrator) am the record owner in the other table of all records created by the action. (I would want the record owner of the original record also to be the owner of the by the action created record)
Is this intended? Is this because I'm owner of the action? Am I overlooking something?
Thanks,
Photo of Yoel Kuliasko

Yoel Kuliasko

  • 520 Points 500 badge 2x thumb

Posted 1 year ago

  • 0
  • 1
Photo of Michael Barrow

Michael Barrow

  • 2,206 Points 2k badge 2x thumb
I have run into this as well. I think that's the way they programmed initially, and it is not acceptable. Right now the user who set up and saved the Action is going to be the owner of all records created by it. They need to change that with the next release (hopefully).
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 51,436 Points 50k badge 2x thumb
I agree, but I'm not so sure that Quick Base sees this as a bug or if its on any enhancement list.  One option is to have a dedicated userid for Actions and Webhooks so that the user is a system type userid and not a real person.

I also am not quite sure what happens to a Webhook or Action when the user eventually becomes deactivated.  I have that like by 101st thing to do on my todo list to understand that out of a concern that the Action or Webhook will become disabled.
Photo of Michael Barrow

Michael Barrow

  • 2,206 Points 2k badge 2x thumb
Yeah, if a consultant or developer like you has temporary access to someone's app, sets up the Action or Webhook, and then goes away and the user is disabled, that is more than a huge annoyance. I think they ought to set it up using application tokens, and you could tie a token to a specific user or flip it to a different user if things change.
Photo of Yoel Kuliasko

Yoel Kuliasko

  • 520 Points 500 badge 2x thumb
Thank you for the replies!
Photo of ARYEH ZELCZER

ARYEH ZELCZER

  • 332 Points 250 badge 2x thumb
You can use the API_ChangeRecordOwner to trigger  a webhook  that can change the record owner.
Photo of Drew

Drew

  • 432 Points 250 badge 2x thumb
This is definitely something that is much needed.  What would be preferable is if you could set the record owner of the new record to either - record owner of trigger record, user from a field, or current user (user that saved the record and fired the web action).  I believe one issue probably stems from the fact that the record owner, like the record ID#, isn't populated until after a record is created.  So if the action is fired as part of the 'saving' process of a new 'triggering' record, there isn't a value to pass.  This comes up in other circumstances as well.  Much needed enhancement, but probably more complicated to implement than it sounds at first.  
Photo of Brian

Brian

  • 10 Points
Yeah, I agree I would be very nice to have the logged in user who triggers the Quick Base action to be the Record Owner of any new records created via the action.

I found a hack that suits our needs after playing with several scenarios including an undocumented (or poorly documented) %curUser% marker, formula fields, additional actions or webhooks, etc. Instead of messing with all that, I opted for simplicity.

Basically, in the "What values will the new record have?" section at the bottom of the Quick Base action "Copy the value from" the "Last Modified By" field in the record that triggers the action and to set a User field in the record that will be created. Then, base reports of this User field instead of the Record Owner field.

In your case you would use the "Record Owner" instead of "Last Modified By" to set the User field.

This is does not achieve exactly what your after, but may be a decent workaround!
(Edited)
Photo of Drew

Drew

  • 422 Points 250 badge 2x thumb
I use this route now as a workaround, although with some caveats.  There are a couple of reasons why you'd want the action to impersonate a specific user.  One of them is text fields that log edits.  I have a number of quickbase actions that pass text to a text field that logs changes.  The 'user' that it shows editing the text is me since the webhook is executed under my credentials.  I could always set up these text fields as child records and change 'edits' to new records, but for a lot of situations it's far more complication than is needed.  My Q&D fix is to add the users name as text to the beginning of the text string that is being passed, which isn't pretty but works.  Small thing though at the end of the day.
Photo of Freddy

Freddy

  • 202 Points 100 badge 2x thumb
I really hope they can add some functionality to be able to copy over the user that should be the record owner so it is not always the person creating the Action.
Photo of ARYEH ZELCZER

ARYEH ZELCZER

  • 332 Points 250 badge 2x thumb
You can use the API_ChangeRecordOwner to trigger  a webhook  that can change the record owner.- I use this and it works perfectly
Photo of Freddy

Freddy

  • 202 Points 100 badge 2x thumb

The whole point is to not have to add more complicated workarounds to a simple, straight forward problem.

You already have the option of "Copy the value from" [Record Owner] to [blank]. Why not add [Record Owner] as an option to copy the value to?

I don't think you should have to complicate things by creating new fields or webhooks as workarounds. 

Photo of ARYEH ZELCZER

ARYEH ZELCZER

  • 332 Points 250 badge 2x thumb
i agree fully was just pointing out a way to get around this issue
Photo of Debbie Hooten

Debbie Hooten

  • 160 Points 100 badge 2x thumb
Hello, I'm not sure if I caught all of the above and whether or not it was figured out.  I added a user field to my change log table and it populates with the current user.  The last modified by field is my name but I captured the user that was making the changes. I used a QuickBase action to log the change.
(Edited)
Photo of QuickBaseCoach App Dev./Training

QuickBaseCoach App Dev./Training, Champion

  • 43,998 Points 20k badge 2x thumb
To capture the user who actually made the change to be recorded in the Action as to who made the change, yes, you capture Last Modified by, and not Current User, as Current User will always be the Owner of the Action, and that is not useful.