If(
!IsBlank(DataCardValue11.Text);
If(
IsBlank(ThisItem.Historico1);
Text(Today(); "dd/mm/yyyy") & "; " & User().FullName & ": " & DataCardValue11.Text;
If(
StartsWith(ThisItem.Historico1; Text(Today(); "dd/mm/yyyy") & "; " & User().FullName);
Substitute(ThisItem.Historico1; Mid(ThisItem.Historico1; Find(": "; ThisItem.Historico1) + 2); DataCardValue11.Text);
Text(Today(); "dd/mm/yyyy") & "; " & User().FullName & ": " & DataCardValue11.Text
)
);
Blank()
)
What I want to happen is:
1- If both the item is empty, and there is nothing written in the text input DataCardValue11, it should update it to the date of today, name of user who is using app + what he wrote in said text input. (So something like 15/11/2024, Joshua Smith created a report)
2- If you go back to the app and save again, this should not be duplicated. (as of now, what will happen is "15/11/2024, Joshua Smith 15/11/2024, Joshua Smith created a report; the date and name will duplicate indefinitely)
3- The user should be able to edit the last part of what he wrote (created a report part).
4- If you erase all what was written, it remains blank, not adding date and user again.
Unfortunately, I'm only acheaving 1 and 4. Meaning, there is duplication, user cannot edit message and if you erase everything and save, it stays blank.
So... How do I change this code for the update property?