Multiple Values, One Field, Extract multiple values from field
Posted by Jdubs - Apr 26 ’16 at 08:25
I have a business requirement to Add a Date field and a Text field for each possible checkbox option. My checkbox has a total of 26 choices (currently).
Is there a better way to approach this problem rather than adding One Date Field and One Text Field for each option (for a total of 52 additional fields on my form)?
I didn't know if there was some programmatic way to store multiple values in one field and then later (for reporting) extract each of those values and match them to one another.
*sigh* Don't think too hard on this; not really your problem, but mine. Just wanted to make sure before I went down this dark path.
Thanks yall!
-
rostislavModeratorMember for: 8 years 22 days
What are you trying to do exactly - why do you need those additional fields?
-
JdubsMemberMember for: 8 years 5 months 9 days
[#1]: I'm trying to display a Text field and a Date field for every checkbox option, if checked.
For example, let's say I have a checkbox with the following options:
- Option 1
- Option 2
- Option 3
- Option 4
- Option 5
Let's say the user selects Options 1, 3, and 5 (since they are check boxes). I want the form to now look like this:
- Option 1 [Text Box] [Date Field]
- Option 2
- Option 3 [Text Box] [Date Field]
- Option 4
- Option 5 [Text Box] [Date Field]
I know that I can do this by creating a Text Box and Date Field for every single option, and then unhide them when the options are chosen.
My question is if there's a way to do this without having to add these extra fields. Because in my scenario there's 26 options (instead of the 5 given above), with the potential to grow much more.
Does that help?
-
Dmitry KozlovAdminMember for: 9 years 8 months 7 days
[#2]: Hi,
Possibly, it's better to use the Related items control for this case. If a user needs to pick an option, he just adds a new item to the related list, selects the name of the option, and sets date and text fields.
-
JdubsMemberMember for: 8 years 5 months 9 days
[#3]: Thanks Dmitry.
I thought about related items control, but every morning at 1:00a.m. I'm archiving the SharePoint item to a SQL database and then deleting the SharePoint item.
From an architecture perspective, I can't picture in my head how to bring over the correct Related Item entries (that could be multiple) for the Correct SharePoint item.
Perhaps I'm overthinking it.
-
Dmitry KozlovAdminMember for: 9 years 8 months 7 days
[#4]: Well, you can retrieve the related items of the current item through the lookup field.