Future proof method of checking for xprofile values
-
Let’s say you have 5 XProfile fields each of which have 5 potential answers, with a simple 1-5 relationship between the answers, and you’re trying to build a progress bar.
The answers all vary in their labeling, so the most obvious solution would be to check the literal string value of each answer and modify your progress bar accordingly.
But if you make even a slight adjustment to the text of any answer, you obviously introduce a breaking change.
Also, if you change the text of a profile answer, it doesn’t change the saved data for users who answered the question before the change.
So, how can I use the answer ID, instead, so that if we make changes to the text of a profile field, I don’t have to include both the old and new answer in my checks?
- The topic ‘Future proof method of checking for xprofile values’ is closed to new replies.