cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sobenson
Helper II
Helper II

Creating SharePoint Item with empty String Variable

I have a security access request list that is for both existing and new employees.  One question is Employee name (which can be for multiple users) a separate question is New Hire Name.  I have a String Variable to gather all the Employee names so when I send an email all the users are listed together.

Screenshot 2020-12-09 152304.png

When sending an email I am able to add the 2 Dynamic Content options together

 Screenshot 2020-12-09 152743.png and that works nicely. If either field is blank the other field fills in.

 

However I am trying to update a second SharePoint list and if it is a New Hire, and the Employee Name field is left blank, I get an error, "The specified user  could not be found", because there is no user.

Screenshot 2020-12-09 153144.png

I tried using the value of "Employee Name" and an Apply to Each container was created, but if there is no name in the Employee field, it doesn't create an item in the new list.

Any suggestions?

2 ACCEPTED SOLUTIONS

Accepted Solutions
alrez
Community Support
Community Support

Hi,

 

Looking at this it looks like this has something to do with how Sharepoint has formatted this field. Usually if the field is just a string field it will accept <null> as a value. But since this field is set up to associate this field with a user it wont accept <null> as a value. I'm not as experiencing in Sharepoint since I am a flow engineer, but I think this is working as intended in Flow. I'm not certain there is a workaround to this within just Flow. Maybe someone who is more experienced in Sharepoint could provide more perspective on a potential mitigation on that side but I'm not certain myself. If you would like you can always open a case on this. I'll include a link below if you would like to go down this route.

 

If you would like to create a ticket with Microsoft Customer Support here is a link on how to do so: https://docs.microsoft.com/en-us/power-platform/admin/get-help-support

 

Regards,

 

Alex

 

-------

 

Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

ScottShearer
Super User
Super User

@sobenson 

Based on what @alrez has said, one option might be for you to insert a condition into your Flow before the Update item action.  Check for your string to be null.  If it is, update the SharePoint list item with no value entered in the offending column.  If the value is not null, then provide your variable as input for the update item action. I experimented with this quite a bit and cannot find another work around.  The condition may not be pretty but it should work.

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

3 REPLIES 3
alrez
Community Support
Community Support

Hi,

 

Looking at this it looks like this has something to do with how Sharepoint has formatted this field. Usually if the field is just a string field it will accept <null> as a value. But since this field is set up to associate this field with a user it wont accept <null> as a value. I'm not as experiencing in Sharepoint since I am a flow engineer, but I think this is working as intended in Flow. I'm not certain there is a workaround to this within just Flow. Maybe someone who is more experienced in Sharepoint could provide more perspective on a potential mitigation on that side but I'm not certain myself. If you would like you can always open a case on this. I'll include a link below if you would like to go down this route.

 

If you would like to create a ticket with Microsoft Customer Support here is a link on how to do so: https://docs.microsoft.com/en-us/power-platform/admin/get-help-support

 

Regards,

 

Alex

 

-------

 

Community Support Team _ Alex Rezac
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

ScottShearer
Super User
Super User

@sobenson 

Based on what @alrez has said, one option might be for you to insert a condition into your Flow before the Update item action.  Check for your string to be null.  If it is, update the SharePoint list item with no value entered in the offending column.  If the value is not null, then provide your variable as input for the update item action. I experimented with this quite a bit and cannot find another work around.  The condition may not be pretty but it should work.

 

 

If I have answered your question, please mark your post as Solved.
If you like my response, please give it a Thumbs Up.

Scott

View solution in original post

sobenson
Helper II
Helper II

Thank you @alrez and @ScottShearer, I did end up using a condition.  Using "If [NewHire] is equal to [null]".  This also helped because the new list wanted all of the users listed separately (even if they were all asking for the same thing).  So it ends up looking like this.

Screenshot 2020-12-14 082909.png

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Users online (2,680)