1

I need guidance in how I create a dropdown in a SharePoint List where the user can select which Period they’d like to enter a dollar value and then have a second field that allows them to enter the related Value Amount for the period.

Screenshot below: How can I relate the Value Amount field for each specific Period in the drop down? enter image description here

I appreciate any help you can provide. Thank you!

2
  • If I'm understanding you correctly, you want it so that if a person changes the Period value from 12/31/2019 to something else, the Value Amount would clear out, and they could enter a new Value Amount, and then if they changed the Period back to 12/31/2019, the Value Amount would switch back to the 500 they just entered (as per your screen shot)? Commented Aug 13, 2020 at 21:10
  • That is correct. Is this possible? or do you have a better suggestion in order to manage and track data for this type of scenario within SharePoint?
    – BrandonH
    Commented Aug 14, 2020 at 0:18

2 Answers 2

0

Without some complicated customized coding, I don't think you can achieve what you want.

The way SharePoint lists are designed, they are meant to store one value per field on each list item. (With some exceptions, such as multi-select choice fields, or user fields that allow multiple users.) But in general, the expectation is that for a single list item, it is going to have only one value per field.

So if your fields are Period, which is a Choice field (represented by the drop-down control), and the Value Amount (which looks to be either a text field or a number field?), SharePoint expects only one value for each of those. Your first option is to have users enter one list item per Period. They create a new item, select the Period, then enter the Value Amount for that Period, then save it. Then they would need to create another list item for the next Period. The form for that would look something like your screenshot, and the list view would look something like this:

screenshot of list view

If you also needed to track these entries by an entity, say by Project or by Department, you could also have another Choice field (for Project or Department) that the user would populate while making their entry. This would mean each Project or Department would have multiple list items, one per Period.

If you need to have all the Value Amounts on one single list item, the way to do it would be to create multiple Value Amount fields, one per Period, and do away with the Period drop-down. The form for that would look something like:

screenshot of new form

And the list view would look something like:

enter image description here

Again, if you needed to differentiate by an entity like Project or Department, you could add a drop-down for that, but this time each entity would have only one list item, since all the Periods would be represented on one list item.

That all being said, as I mentioned in the beginning, what you want could possibly be achieved through a custom form and some custom coding. To do it, what I personally would do (because there is usually more than one way), is set up a list with individual Value Amount fields for each period, as in my second example, and then in my code, read the field names, parse off the dates, construct a drop-down using those dates, and as the user changed the drop-down, the code would reach back to the list item and get or set the value of the individual fields based on the value in the form's Value Amount text box by matching the beginning part of the field name to the date selected in the drop-down. It would give the illusion of the functionality you want, but really in the background, the data would be stored as in my second example.

0

You could create a calculated column to store related Value Amount. Use following formula in the calculated.

=IF(Period="12/31/2019","500","")
2
  • This however need to be dynamic. So, for instance, the user selects the 12/31/2019 period and enters the related value for the period. For the next period 3/31/2020, they need enter the related value for that period. Keep in mind that the historical periods values need remain captured.
    – BrandonH
    Commented Aug 14, 2020 at 10:32
  • I think it’s impossible to make Value Amount change automatically based on Period. Commented Aug 17, 2020 at 8:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.