cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Workflow Hero

List Column Field on Form Twice

Jump to solution

Does it not work if you put a list column field on the form twice? The New Item form is not saving my input from this field to the list.

 

We have two Product Number formats, so my form conditionally shows the appropriate panel based on the Product Number Type choice, with validation for the number of digits corresponding to each field. The only way to do this validation is with a regular expression in the control setting, so it doesn't work to make the validation conditional (no access to the Number Type's value, either by Reg Ex or JavaScript). That is how I ended up with two fields for one list column to begin with.

 

In the attached image, the fields with matching colors are both connected to the same list column:

 

  • Yellow ---> PN1
  • Green ---> PN2
  • Red ---> PN3

 

I really don't want to have to have two sets of Product Number list columns. Any suggestions as to why the form is not saving the Part Number values?

Labels: (1)
0 Kudos
Reply
5 Replies
Workflow Hero

Re: List Column Field on Form Twice

Jump to solution

this is not supported.

how could form know which of the values actually write to the list field?

 

 

you could workaround with a validation rule based on replace() runtime function which supports regular expression as well.

general validation formula might look llike

ProductControl == "Product1" && replace(ProductNumberControl,"regex_to_validate","SOME_VALUE_TO_CHECK") != "SOME_VALUE_TO_CHECK"

ie. you replace a (regex) pattern you want to validate with a whatever value/string and check whether replace() output equals to that same 'whatever value'. if it doesn't you are sure input value doesn't match validation pattern.

 

0 Kudos
Reply
Workflow Hero

Re: List Column Field on Form Twice

Jump to solution

I thought by disabling the unused fields along with hiding them, it would know use the enabled fields. Could you please tell me what the disable option on a formatting rule actually does? Thanks!

0 Kudos
Reply
Workflow Hero

Re: List Column Field on Form Twice

Jump to solution

formatting rules control just visual behaviour of affected controls.

apart from some styling (color, font, ...) you can 

hide control - it visually disapers

disable control - control is visible, but grayed out and you are not allowed to change it's content

 

 

0 Kudos
Reply
Workflow Hero

Re: List Column Field on Form Twice

Jump to solution

Hi,

 

my suggestion is to not have these fields directly connected to the columns but just named and have somewhere in the form three hidden calculated values that, depending on the selection get the value from the proper field and each of this calculated field is connected with your SharePoint column..in this way you should be able to have a single set of columns in SharePoint and two fields in your form..

Reply
Workflow Hero

Re: List Column Field on Form Twice

Jump to solution
That's really clever, @jackgelo, thank you!
0 Kudos
Reply