Answers.Body: <p>One option is to use <a href="https://www.drupal.org/project/webform_conditional_values" rel="nofollow noreferrer">https://www.drupal.org/project/webform_conditional_values</a> with Webform-CiviCRM integration if the ID is known before submission.  If it's not available until after submission, you'll need to write code.  Erik suggests one way, you could also write a Drupal module to push it to Civi.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-29T10:51:33.667Z
Answers.LastActivityDate: 2020-10-29T10:51:33.667Z
Answers.UserDisplayName: Jon G - Megaphone Tech
Answers.Body: <p>You will probably need to develop an action that can take that ID from the data coming into the action and set it. There is a standard action to update a custom field (Set Custom Field) but it will ask for a value and will not be able to pick up the value from the input just like that.</p>
  <p>Developing your own action is documented here: <a href="https://docs.civicrm.org/civirules/en/latest/create-your-own-action/" rel="nofollow noreferrer">https://docs.civicrm.org/civirules/en/latest/create-your-own-action/</a></p>
  <p>An alternative might be to use the Form Processor extension, and pick up the ID from the incoming data like that. Check the documentation here: <a href="https://docs.civicrm.org/formprocessor/en/latest/" rel="nofollow noreferrer">https://docs.civicrm.org/formprocessor/en/latest/</a></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-10-29T09:32:14.283Z
Answers.LastActivityDate: 2020-10-29T09:32:14.283Z
Answers.UserDisplayName: ErikH - CiviCooP
Answers.Body: <p>If you are not developers, you can hire one from <a href="https://civicrm.org/partners-contributors" rel="nofollow noreferrer">https://civicrm.org/partners-contributors</a>, including ErikH or Jon G (or us ;) ).</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-11-06T21:27:20.600Z
Answers.LastActivityDate: 2020-11-06T21:27:20.600Z
Answers.UserDisplayName: Joe Murray
Body: <p>We have a Drupal 7 website that we are having users submit a webform on. When a webform is submitted it is assigned a unique ID. This ID used to generate a PDF to view the webform results and is viewable on the Drupal side. The problem we are running into is getting this information over to the CiviCRM side automatically. We created a custom data field in CiviCRM for the ID to go in and have it left blank during the submission, and we installed the module CiviRules Webform CiviCRM Submission Trigger so we can have a rule run when the form is submitted. The part we need help with is getting a rule that takes that ID and fills in the blank field with it upon submission or some way to do the equivalent.</p>
  
Tags: <custom-fields><webform-civicrm><civirules><drupal-7>
Title: How to get a CiviRule to fill in a custom field upon a webform submission?
ThreadText: # How to get a CiviRule to fill in a custom field upon a webform submission?
  
  (Asked by: username_0 on 2020-10-28)
  
  We have a Drupal 7 website that we are having users submit a webform on. When a webform is submitted it is assigned a unique ID. This ID used to generate a PDF to view the webform results and is viewable on the Drupal side. The problem we are running into is getting this information over to the CiviCRM side automatically. We created a custom data field in CiviCRM for the ID to go in and have it left blank during the submission, and we installed the module CiviRules Webform CiviCRM Submission Trigger so we can have a rule run when the form is submitted. The part we need help with is getting a rule that takes that ID and fills in the blank field with it upon submission or some way to do the equivalent.
  
  **Tags:** custom-fields, webform-civicrm, civirules, drupal-7
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2020-10-29. Score: 1
  
  One option is to use <https://www.drupal.org/project/webform_conditional_values> with Webform-CiviCRM integration if the ID is known before submission. If it's not available until after submission, you'll need to write code. Erik suggests one way, you could also write a Drupal module to push it to Civi.
  
  
  ---
  
  ### Answer by username_2 on 2020-10-29. Score: 1
  
  You will probably need to develop an action that can take that ID from the data coming into the action and set it. There is a standard action to update a custom field (Set Custom Field) but it will ask for a value and will not be able to pick up the value from the input just like that.
  
  Developing your own action is documented here: <https://docs.civicrm.org/civirules/en/latest/create-your-own-action/>
  
  An alternative might be to use the Form Processor extension, and pick up the ID from the incoming data like that. Check the documentation here: <https://docs.civicrm.org/formprocessor/en/latest/>
  
  
  ---
  
  ### Answer by username_3 on 2020-11-06. Score: 0
  
  If you are not developers, you can hire one from <https://civicrm.org/partners-contributors>, including username_2 or Jon G (or us ;) ).
  
  
  ---
  
  