Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi I'm using a DynamicRecord for contour and doing
if(entry.HasField("First Name")) {
entry.GetField("First Name");
}
My form doesn't have a First Name field at the moment so when I go to GetField it returns a Sequence contains no elements exception.
Just wondering if this is a known bug and the best practice way of getting form field responses without wrapping everything in try catches?
Hi Tom
What version of Contour and Umbraco are you using?
Not sure if it helps in your case but perhaps try running the script as Mike suggests here: http://our.umbraco.org/forum/umbraco-7/using-umbraco-7/53211-Sequence-contains-not-matching-element#comment185357
Cheers, Jan
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Sequence Contains no Elements
Hi I'm using a DynamicRecord for contour and doing
My form doesn't have a First Name field at the moment so when I go to GetField it returns a Sequence contains no elements exception.
Just wondering if this is a known bug and the best practice way of getting form field responses without wrapping everything in try catches?
Hi Tom
What version of Contour and Umbraco are you using?
Not sure if it helps in your case but perhaps try running the script as Mike suggests here: http://our.umbraco.org/forum/umbraco-7/using-umbraco-7/53211-Sequence-contains-not-matching-element#comment185357
Cheers, Jan
is working on a reply...