Answers.Body: <p>Not sure how the actual table display is structed but this for example works to show some custom contact information for a member with 'new' status on dmaster</p>
  <p>{if '[Contact_Membership_contact_id_01.status_id:label]' eq 'New'}[constituent_information.Most_Important_Issue:label]{else}{/if}</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-08-21T19:02:31.543Z
Answers.Text: great. just adding another example ... {if '[Membership_Contact_contact_id_01.Walk_info.Country_of_origin:label]' eq 'Other'} [Membership_Contact_contact_id_01.Walk_info.Country_of_origin_Other]{else}[Membership_Contact_contact_id_01.Walk_info.Country_of_origin:label]{/if}
Answers.UserDisplayName: petednz - fuzion
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-08-23T23:48:29.967Z
Answers.Text: Just a note it might be better to use `:name` not `:label`, otherwise it won't work if someone switches languages, or edits the label.
Answers.UserDisplayName: Demerit
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2024-08-21T09:29:45.107Z
Answers.LastActivityDate: 2024-08-21T09:29:45.107Z
Answers.UserDisplayName: RebeccaTregenna
Body: <p>I am using SearchKit to build a professional membership register in Civi 5.58.1.
  I want to show the value in a transformed field from the search (showing professional registration details), only if the field &quot;Registration Status&quot; does not have the value &quot;Retired&quot;.
  I have tried using the following Smarty code in Rewrite, which does not seem to work. Am I doing something wrong?</p>
  <pre><code>{capture assign=RegStatus}{[Membership_Contact_contact_id_01.Details_ccc.Registration_status:label]}{/capture}
  {capture assign=RegDetails}{[CONCAT_WS_Membership_Contact_contact_id_01_Details_ccc_Practise_Licensing_Authority_Membership_Contact_contact_id_01_Details_ccc_Practise_license_number]}{/capture}
  {If $RegStatus eq 'Retired'}
  {$null}
  {else}{$RegDetails}
  {/if}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-04-27T12:42:16.767Z
Comments.Text: Hi.Not sure how the actual table display is structed but this for example works to show some custom contact information for a member with 'new' status on dmaster - {if  '[Contact_Membership_contact_id_01.status_id:label]'  eq 'New'}[constituent_information.Most_Important_Issue:label]{else}{/if}
Comments.UserDisplayName: RebeccaTregenna
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-04-27T14:48:12.133Z
Comments.Text: Thank you Rebecca - I can see it was a syntax problem - you solved it! Much appreciated
Comments.UserDisplayName: Simon Thornton-Wood
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2024-08-20T23:17:13.173Z
Comments.Text: @RebeccaTregenna do you want to add as an answer. this helped me.
Comments.UserDisplayName: petednz - fuzion
Tags: <smarty><searchkit>
Title: SearchKit: rewrite value dependent on value in a separate field
ThreadText: # SearchKit: rewrite value dependent on value in a separate field
  
  (Asked by: username_0 on 2023-04-27)
  
  I am using SearchKit to build a professional membership register in Civi 5.58.1.
  I want to show the value in a transformed field from the search (showing professional registration details), only if the field "Registration Status" does not have the value "Retired".
  I have tried using the following Smarty code in Rewrite, which does not seem to work. Am I doing something wrong?
  {capture assign=RegStatus}{[Membership_Contact_contact_id_01.Details_ccc.Registration_status:label]}{/capture}
  {capture assign=RegDetails}{[CONCAT_WS_Membership_Contact_contact_id_01_Details_ccc_Practise_Licensing_Authority_Membership_Contact_contact_id_01_Details_ccc_Practise_license_number]}{/capture}
  {If $RegStatus eq 'Retired'}
  {$null}
  {else}{$RegDetails}
  {/if}
  
  **Tags:** smarty, searchkit
  
  > **Comments:**
  > **username_1**: Hi.Not sure how the actual table display is structed but this for example works to show some custom contact information for a member with 'new' status on dmaster - {if  '[Contact_Membership_contact_id_01.status_id:label]'  eq 'New'}[constituent_information.Most_Important_Issue:label]{else}{/if}  
  > **username_0**: Thank you Rebecca - I can see it was a syntax problem - you solved it! Much appreciated  
  > **username_2**: @username_1 do you want to add as an answer. this helped me.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2024-08-21. Score: 2 | Accepted answer
  
  Not sure how the actual table display is structed but this for example works to show some custom contact information for a member with 'new' status on dmaster
  
  {if '[Contact\_Membership\_contact\_id\_01.status\_id:label]' eq 'New'}[constituent\_information.Most\_Important\_Issue:label]{else}{/if}
  
  > **Comments:**
  > **username_2**: great. just adding another example ... {if '[Membership_Contact_contact_id_01.Walk_info.Country_of_origin:label]' eq 'Other'} [Membership_Contact_contact_id_01.Walk_info.Country_of_origin_Other]{else}[Membership_Contact_contact_id_01.Walk_info.Country_of_origin:label]{/if}  
  > **username_3**: Just a note it might be better to use `:name` not `:label`, otherwise it won't work if someone switches languages, or edits the label.  
  
  ---
  
  