# Cross-compare two fields from two data type using condition

**URL:** <https://forum.bubble.io/t/cross-compare-two-fields-from-two-data-type-using-condition/236209>\
**Category:** Need help\
**Created:** [December 8, 2022, 8:50am UTC](https://forum.bubble.io/t/cross-compare-two-fields-from-two-data-type-using-condition/236209 "2022-12-08T08:50:28Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![WildlyOptimistic](https://avatars.discourse-cdn.com/v4/letter/w/278dde/32.png) [@WildlyOptimistic](https://forum.bubble.io/u/WildlyOptimistic)\
**Post date:** [December 8, 2022, 8:50am UTC](https://forum.bubble.io/t/cross-compare-two-fields-from-two-data-type-using-condition/236209/1 "2022-12-08T08:50:29Z")

</div>

Hello folks,

I’m trying to make a workflow. The process would be:

1, compare two fields’ values. (they are both texst, and are from different types of data)

2, If it is a match ( i.e. two fields are identical text ), the user can get 1 point.  
If it is not a match, do nothing.

3, there will be comparisons of 6 pairs of fields. If all are a match, then the user’s maxim point will be 6 points. If all non-match, the user will have 0 points.

4, I also created a Data Type for Point. So in the workflow, it is meant to “make change to a thing (point)” or "Create a thing ( point) " .

I was trying to create a workflow and I was trying to use conditional (if match, plus 1 point). However, I found out there’s no “=” for text comparison.

My question are

Q1 “=” only for numeric fields ? How can I compare texts ? Should I grant each text with a numeric attribute, so the system can compare the numbers behind the scene ?

Q2 Do I need to have the Expression Plugin to realize “+1” activitiy ?

Thank you as always,

---

<div class="post-metadata">

**Author:** ![keith](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/keith/32/56020_2.png) [@keith](https://forum.bubble.io/u/keith)\
**Post date:** [December 8, 2022, 9:06am UTC](https://forum.bubble.io/t/cross-compare-two-fields-from-two-data-type-using-condition/236209/2 "2022-12-08T09:06:40Z")

</div>

Eh, Bubble can compare text data types. The equality condition you’re looking for is called “is”. (Conversely the state of not being equal to is labeled “is not”.)

For example, if text1 is the string “keith” and text2 is the string “keith”, the expression:

`text1 is text2`

Will evaluate to yes (true).

As for scoring, yeah just increment the score (a value of number type) by one by adding 1 to it.

Have you done the Bubble lessons?

(Also, I’m pretty sure that the folks behind Bubble feel that this sort of nomenclature is pretty much self-explanatory, but if you hover over the operator menu for a moment, you will get a link to the reference and it’ll take you here: [Operators & Comparisons - Bubble Docs](https://manual.bubble.io/core-resources/data/operations-and-comparisons#is). You may want to give that a quick read.)

---

<div class="post-metadata">

**Author:** ![WildlyOptimistic](https://avatars.discourse-cdn.com/v4/letter/w/278dde/32.png) [@WildlyOptimistic](https://forum.bubble.io/u/WildlyOptimistic)\
**Post date:** [December 8, 2022, 10:12am UTC](https://forum.bubble.io/t/cross-compare-two-fields-from-two-data-type-using-condition/236209/3 "2022-12-08T10:12:40Z")

</div>

Hi @Keith, thank you !

Yes it is kinda working now. Just at the scoring part: It doesn’t give me “+1”, it only gives me “=”. Then I used “+1”, but by default the system changed it back to “=1”. So in the end, though the user could have 3 points, the system only gave him 1 points.

How do I make it incremental ?  
Thanks

 ![image](https://us1.discourse-cdn.com/bubble/original/3X/5/f/5f58d3f1f0b0a13127d4200d5e146b0c54e79f49.png)

---

<div class="post-metadata">

**Author:** ![keith](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/keith/32/56020_2.png) [@keith](https://forum.bubble.io/u/keith)\
**Post date:** [December 8, 2022, 10:38am UTC](https://forum.bubble.io/t/cross-compare-two-fields-from-two-data-type-using-condition/236209/4 "2022-12-08T10:38:43Z")

</div>

In this context (where you are setting the value of a field to the existing value of the field plus 1), your assignment statement must be exactly that.

I’m not going to type out the expression you shared in your screenshot, but in the abstract:

If you want to increment `Current User’s Thing’s User Point` field by one, you set the value of the `User Point` field (as you have it in your screenshot) to:

`Current User’s Thing’s User Point + 1`

It’s just like in a normal programming language where, if I want to increment variable a by one, I might do:

`a = a+1`

In Bubble, “a” is some crazy expression you have to construct.

---

<div class="post-metadata">

**Author:** ![WildlyOptimistic](https://avatars.discourse-cdn.com/v4/letter/w/278dde/32.png) [@WildlyOptimistic](https://forum.bubble.io/u/WildlyOptimistic)\
**Post date:** [December 8, 2022, 10:56am UTC](https://forum.bubble.io/t/cross-compare-two-fields-from-two-data-type-using-condition/236209/5 "2022-12-08T10:56:57Z")

</div>

Thank you so much Keith. It is working now !  
Your explanation is easy to understand to someone like me having no logic or coding background at all.

Have a lovely day

---

<div class="post-metadata">

**Author:** ![keith](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/keith/32/56020_2.png) [@keith](https://forum.bubble.io/u/keith)\
**Post date:** [December 8, 2022, 11:03am UTC](https://forum.bubble.io/t/cross-compare-two-fields-from-two-data-type-using-condition/236209/6 "2022-12-08T11:03:46Z")

</div>

Glad I could help!

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/bubble/original/3X/2/8/2847faa74692c2ffa5d939d3dc3724cdd060d247.png) [@system](https://forum.bubble.io/u/system)\
**Post date:** [February 16, 2023, 8:51am UTC](https://forum.bubble.io/t/cross-compare-two-fields-from-two-data-type-using-condition/236209/7 "2023-02-16T08:51:05Z")

</div>

This topic was automatically closed after 70 days. New replies are no longer allowed.
