question

TovyThomas-9643 avatar image
0 Votes"
TovyThomas-9643 asked TovyThomas-9643 commented

SharePoint Calculated Form - IF Statement

I'm using a list off the asset inventory template (Sharepoint Online) and have a column called serial number and realized I didn't have the computer name column which is derived with a fixed code + serial number.

I added a calculated column with single line of text as the result.

The formula originally was set to =("621-")&[Serial number]

This works great but as expected, this fills for all items (printers/docks etc.. ) which isn't needed.

So I took it a step further and went this way

=IF([Asset type]="Laptop",("621-")&[Serial number]) so it looks at the asset type and this is working but puts the word No in all other fields.

However, I need to add another qualifier to fit the first item so if the asset type is Laptop or Desktop, then it will be ("621-")&[Serial number] , or else just be blank.

I've tried multiple variations but keep getting syntax errors.





office-sharepoint-online
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @TovyThomas-9643,

I am currently looking into this issue and will give you an update as soon as possible.

Thank you for your understanding and support.

0 Votes 0 ·

1 Answer

JinweiLi-MSFT avatar image
0 Votes"
JinweiLi-MSFT answered TovyThomas-9643 commented

Hi @TovyThomas-9643,

Please try to use this:

 =IF(OR([Asset type]="Laptop",[Asset type]="Desktop"),("621-")&[Serial number],"")


If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Thank you, that worked perfectly.

1 Vote 1 ·