How to get webform field value in hook_webform_results_access In webform 7.x-4.11 I use this :

if (webform_results_access($node)) {
    $actions['resend_app'] = array(
      'title' =&gt; t('Resend Appointment'),
      'href' =&gt; 'ical/' ,
    );
  }


I use it to add a "Resend Appointment" option (just as "resend email") when editing a webform.

I would like to add in the "href" some field value of this webform. How can I do that?
$submission->data[$sid][0]

for exemple:

if (webform_results_access($node) &amp;&amp; ($node-&gt;nid == '23')) {
      $actions['resend_ical'] = array(
      'title' =&gt; t('Resend ical'),
      'href' =&gt; 'ical?' . $submission-&gt;data[5][0] . '&amp;' . $submission-&gt;data[6][0] . '&amp;' . $submission-&gt;data[35][0] . '&amp;' . $submission-&gt;data[36][0] . '&amp;' . $submission-&gt;data[24][0] . '&amp;' . $submission-&gt;data[34][0] . '&amp;' . 'node/' . $node-&gt;nid . '/submission/' . $submission-&gt;sid ,
      'query' =&gt; drupal_get_destination(),
    );
  }


this is that simple!