I'm trying to make a form using the bot framework using the instructions in this question same environment (Visual Studio C#), except that my GroupOptions
looks like this:
public enum GroupOptions
{
[Describe("Grupo A")]
GrupoZ,
[Describe("Grupo B")]
GrupoB,
[Describe("Grupo C")]
GrupoC,
[Describe("Grupo D")]
GrupoD,
[Describe("Grupo E")]
GrupoE,
[Describe("Grupo F")]
GrupoF,
[Describe("Grupo G")]
GrupoG,
[Describe("Grupo H")]
GrupoH
};
The reason why Grupo A matches GrupoZ is because if I write it like this:
[Describe("Grupo A")]
GrupoA,...
I get the error 'A' is not an option every time I try clicking on it, but when I use GrupoZ like this:
var query = await result;
string current = (query.grupo.Value.ToString()[query.grupo.Value.ToString().Length - 1]).ToString().Replace("Z","A");
string message = $" \nThe teams in group {current} are: ";
... later on I use current on a linq query
And I try clicking on it the whole form is sent again, no error message or anything, the form is just straight up sent again, every other option B,C,D... works perfectly why does this happen and how can I work around it? Is the capital letter A reserved or something? I have also tried changing the option further down and adding options above it with the same results. Any insight will be greatly appreciated, I'll upload larger chunks of code if requested.
I am not sure about what is causing the error. But you don't have to struggle by replacing the z with a. You can simply make use of the Terms attribute in FormFlow
I was able to select GrupoA by typing 'A' using the following enum:
public enum GroupOptions{
[Describe("Grupo A")]
[Terms("A")]
GrupoA=1,
[Describe("Grupo B")]
GrupoB,
[Describe("Grupo C")]
GrupoC,
[Describe("Grupo D")]
GrupoD,
[Describe("Grupo E")]
GrupoE,
[Describe("Grupo F")]
GrupoF,
[Describe("Grupo G")]
GrupoG,
[Describe("Grupo H")]
GrupoH
};