File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ export class DynamicForm extends React.Component<
260260 . map ( ( term ) => `-1#;${ term . name } |${ term . key } ;` )
261261 . join ( "#" ) ;
262262 } else if ( fieldType === "User" ) {
263- objects [ `${ columnInternalName } Id` ] = val . newValue ;
263+ objects [ `${ columnInternalName } Id` ] = val . newValue . length === 0 ? null : val . newValue ;
264264 } else if ( fieldType === "Choice" ) {
265265 objects [ columnInternalName ] = val . newValue . key ;
266266 } else if ( fieldType === "MultiChoice" ) {
@@ -269,7 +269,7 @@ export class DynamicForm extends React.Component<
269269 objects [ columnInternalName ] = JSON . stringify ( val . newValue ) ;
270270 } else if ( fieldType === "UserMulti" ) {
271271 objects [ `${ columnInternalName } Id` ] = {
272- results : val . newValue . lenght === 0 ? null : val . newValue ,
272+ results : val . newValue . length === 0 ? null : val . newValue ,
273273 } ;
274274 } else if ( fieldType === "Thumbnail" ) {
275275 if ( additionalData ) {
Original file line number Diff line number Diff line change @@ -610,7 +610,11 @@ export default class SPService implements ISPService {
610610 const emails = [ ] ;
611611 result [ fieldName ] . forEach ( element => {
612612 const loginNameWithoutClaimsToken = element . Name . split ( "|" ) . pop ( ) ;
613- emails . push ( loginNameWithoutClaimsToken + "/" + element . Title ) ;
613+ if ( ! loginNameWithoutClaimsToken . toLowerCase ( ) . includes ( 'null' ) ) {
614+ if ( ! element . Title . toLowerCase ( ) . includes ( 'null' ) ) {
615+ emails . push ( loginNameWithoutClaimsToken + "/" + element . Title ) ;
616+ }
617+ }
614618 } ) ;
615619 return emails ;
616620 }
@@ -634,11 +638,15 @@ export default class SPService implements ISPService {
634638 if ( result && result [ fieldName ] ) {
635639 const element = result [ fieldName ]
636640 const loginNameWithoutClaimsToken = element . Name . split ( "|" ) . pop ( ) ;
637- return loginNameWithoutClaimsToken + "/" + element . Title ;
641+ if ( ! loginNameWithoutClaimsToken . toLowerCase ( ) . includes ( 'null' ) ) {
642+ if ( ! element . Title . toLowerCase ( ) . includes ( 'null' ) ) {
643+ return loginNameWithoutClaimsToken + "/" + element . Title ;
644+ }
645+ }
638646 }
639647 }
640648
641- return null ;
649+ return [ ] ;
642650 } catch ( error ) {
643651 console . dir ( error ) ;
644652 return Promise . reject ( error ) ;
You can’t perform that action at this time.
0 commit comments