StratusForms icon indicating copy to clipboard operation
StratusForms copied to clipboard

People Picker Field - Saving causes the "\" to duplicate

Open timmermang opened this issue 8 years ago • 11 comments

Hi Marc, Thank you for the support on the previous issue ... Still loving the product !

Can you please check the People Picker field ? When I first time save a people field, it saves "CORP\USER1". If I modify the item and save it again, it will be saved as "CORP\USER1". Next time will be "CORP\\USER1" ...

timmermang avatar Dec 28 '17 07:12 timmermang

hmm... and this is with version 1.5? What version of SharePoint are you using? I'll look into it.

mrackley avatar Dec 28 '17 15:12 mrackley

Hi Mark, It's indeed version 1.5 and SharePoint 2016. I'll check it again tomorrow just to be sure but I've tested it twice

timmermang avatar Dec 28 '17 17:12 timmermang

Hi Mark, Just finished testing and I can confirm that it happens with version 1.5. I switched back to version 1.4 and I didn't have the issue. I do have to correct myself. The first submit of the people picker item contains already 2 backslashes

timmermang avatar Dec 29 '17 06:12 timmermang

Thanks, I'm trying to find an environment I can reproduce it on.

mrackley avatar Dec 30 '17 02:12 mrackley

Does it save the "\\" in the StratusFormsData object or does it just display it in the form field?

mrackley avatar Dec 30 '17 17:12 mrackley

It's saved into the StatusFormsData but it is not visible in the form itself because of the Peoplepicker translation

timmermang avatar Jan 02 '18 07:01 timmermang

I just confirmed in my on prem environment that it is storing the user as Domain\user, but the people picker is still functioning properly and resolving the user. Is it possible to get me access to your dev environment to see what's going on?

mrackley avatar Jan 02 '18 22:01 mrackley

I duplicated the site collection to another environment and I still have the same issue. How do I provide you the credentials to that environment ?

timmermang avatar Jan 03 '18 10:01 timmermang

Shoot me an email at [email protected] and we'll get this sorted. Are you using something other than Windows authentication?

mrackley avatar Jan 03 '18 14:01 mrackley

the reason it wasn't working is because you were not waiting for the client side scripts to load. When using SharePoint's client side scripts for things like PeoplePickers you have to wait for them to load before you can use them. When creating a new item, they have plenty of time to load before you start to fill out the people picker, however when you are loading a new page, the the people picker was getting set before the client libraries were loaded. Causing the error you saw. Make you use "ExecuteOrDelayUntilScriptLoaded" instead jQuery document ready when using the PeoplePickers. I updated the Documentation on the StratusForms site to make this more clear.

mrackley avatar Jan 11 '18 14:01 mrackley

Oops. I wrote a line of code that fixes that waiting on a pull-request... basically drops the double slash back to one when resolving, the final decoding call will cleanse the data out (just in case) and revert to doubleslash... but at least it doesn't then continue to add slashes on each re-save.

davidcfk avatar Sep 19 '18 05:09 davidcfk