No increase if same value

So i want a feature that if the new entry is same to earlier enter then set the new entry to 1

eg -

old entry :-
MM240424

new entry :-
MM1240424 or MM2404241

Thank You

@Mayank can you elaborate more what you are trying to do? like a word won’t split in this was instead you can use the contains block to check if a particular text segment is there or not

This is the code.

So i want check if the Job No is same or not.
If it is same then i want to set it as 1

MMM2404241

@Mayank i can’t check the whole code as i don’t know you work purpose please post the specific block only… and elaborate according to it

It will take some weeks to understand what you want…just be specific friend!

basically
There are two variable.
var 1 = textbox.text
var 2 = get from tinydb

if var 1 = var 2
then set result to mayank1 (this may continue to mayank2, mayank3, etc)
else
mayank

so somewhat it may be clear

This is what you want—

the data of var2 is stored in tinydb

blocks edited, please check