# Conditional rule

**URL:** <https://community.glideapps.com/t/conditional-rule/32919>\
**Category:** Ask for Help\
**Created:** [October 11, 2021, 3:13am UTC](https://community.glideapps.com/t/conditional-rule/32919 "2021-10-11T03:13:48Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sales\_Manager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sales_manager/32/16172_2.png) [@Sales\_Manager](https://community.glideapps.com/u/Sales_Manager)\
**Post date:** [October 11, 2021, 3:13am UTC](https://community.glideapps.com/t/conditional-rule/32919/1 "2021-10-11T03:13:48Z")

</div>

I have in glide a list of employees by name and email,  
I want in the application when i chooses the name, how can I make the email field to be filled in automatically.  
And if I change the name, the email changes accordingly.

(II Think It is similar to the conditional rule, if A = Name, B = Email )

![لقطة الشاشة 2021-10-11 055710](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/0/008efd19afd9c148017b8e29838bcc2c7ed351c8.png)  
 ![لقطة الشاشة 2021-10-11 055630](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/c/e/ce263a0aaff1c8961997f8f5309ccb21cd6c6883.png)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [October 11, 2021, 3:51am UTC](https://community.glideapps.com/t/conditional-rule/32919/2 "2021-10-11T03:51:40Z")

</div>

Take a look at [Screen Values](https://docs.glideapps.com/all/reference/values/screen-values)

---

<div class="post-metadata">

**Author:** ![Sales\_Manager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sales_manager/32/16172_2.png) [@Sales\_Manager](https://community.glideapps.com/u/Sales_Manager)\
**Post date:** [October 11, 2021, 2:36pm UTC](https://community.glideapps.com/t/conditional-rule/32919/3 "2021-10-11T14:36:01Z")

</div>

Yes, I know that, but what I meant is something different.  
When I choose the name Anas it gives me Anas email automatically, and if I choose the name Ammar it gives me Ammar email automatically, and so on…

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [October 11, 2021, 2:55pm UTC](https://community.glideapps.com/t/conditional-rule/32919/4 "2021-10-11T14:55:27Z")

</div>

If you are selecting a name and it’s already attached to an email, why do you need another choice component for the email? If they have to match, why make the user choose from both instead of just choosing one (preferably name). It would be a lot simpler to pick from a list of names, but save the email value to the table, then use a Relation and Lookup to get the name and any other user info later.

I guess I don’t understand why you even have a choice component for the email if you are going to override it anyway, based on the chosen name.

---

<div class="post-metadata">

**Author:** ![Sales\_Manager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/sales_manager/32/16172_2.png) [@Sales\_Manager](https://community.glideapps.com/u/Sales_Manager)\
**Post date:** [October 11, 2021, 3:29pm UTC](https://community.glideapps.com/t/conditional-rule/32919/5 "2021-10-11T15:29:51Z")

</div>

Well, I have about 50 employees who use the app, Each employee will only see the customers he added in the app based on his email,

I, as an admin, sometimes transfer a customer from one user to another.  
I have to edit the data and change the name and email of the user so that it appears to the other user.

If you change the name only, it will not appear to the other person…  
For the safety of the error, the e-mail must be changed automatically when changing the name. Is there a safer way?

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [October 11, 2021, 3:54pm UTC](https://community.glideapps.com/t/conditional-rule/32919/6 "2021-10-11T15:54:33Z")

</div>

So are you saying that you have a list of customers, and for each customer, there are columns to store an employee name and email? At most I would only ever store the employee email in that customer sheet. You can use a relation and lookups to get the rest of the employee information from just that email.

If I understand correctly, you have an employee sheet with an employee name and the name is also duplicated on several customer records in a customer sheet. It not very good practice to duplicate data…especially when it can be properly linked in a relational database.

You should only need to change the email on the customer record and nothing else. A single choice component that’s set up to display names but store the email as the underlying value would be sufficient. Change one choice component to select a different employee and the relation and lookups will take care of the rest.

---

<div class="post-metadata">

**Author:** ![Wiz.Wazeer](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/wiz.wazeer/32/72423_2.png) [@Wiz.Wazeer](https://community.glideapps.com/u/Wiz.Wazeer)\
**Post date:** [October 11, 2021, 4:52pm UTC](https://community.glideapps.com/t/conditional-rule/32919/7 "2021-10-11T16:52:26Z")

</div>

Download the CRM template from the store. It does what you are trying to do. You just need to reverse the process from employee to customer to customer to employee. You find the customer , then assign customer to the employee you want. It is simpler.
