Form syntax for setting default field values as current agent?

Is there form xml for having a form auto-fill the current user’s Agent into an Agent querycombobox on a form? Or is that hard coded for certain fields only?

The desired function would be like that of CreatedBy and ModifiedBy where the current user is input automatically when saving a form, but applied to other fields.

I know you can set default=“your own name” but that would set the default to that name for every user.

Hi @nfshoobs,

This is already possible! You can add in the initialize section of the query combo box field definition default=CURRENT_AGENT. See the example below:

<cell type="label" labelfor="3"/>
<cell type="field" id="3" name="agent1" uitype="querycbx" initialize="name=Agent;title=Agent;default=CURRENT_AGENT" isrequired="false"/>

Nice!! I was hoping this was currently implemented, but couldn’t find reference in the documentation or examples in any of my forms. Thanks for the info!

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.