Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. SharePoint
  4. Formula problem

Formula problem

Scheduled Pinned Locked Moved SharePoint
sharepointhelpannouncement
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P Offline
    P Offline
    Phrone
    wrote on last edited by
    #1

    Hi, I'm new to Sharepoint and have a problem with a formula to display different messages in a column. I have a column named Version that contains a files version. If the version is 0.x I want Draft to displayed in another colummn, if version is 1.x display Revision 1 etc. This is what I have now, and as you probably understand it doesn't work. :^) =IF(ISNUMBER(FIND("0.",[Version])), "Draft", OR(IF(ISNUMBER(FIND("1.",[Version])), "Review 1"), OR(IF(ISNUMBER(FIND("2.",[Version])), "Review 2"), OR(IF(ISNUMBER(FIND("3.",[Version])), "Final")))))

    D 1 Reply Last reply
    0
    • P Phrone

      Hi, I'm new to Sharepoint and have a problem with a formula to display different messages in a column. I have a column named Version that contains a files version. If the version is 0.x I want Draft to displayed in another colummn, if version is 1.x display Revision 1 etc. This is what I have now, and as you probably understand it doesn't work. :^) =IF(ISNUMBER(FIND("0.",[Version])), "Draft", OR(IF(ISNUMBER(FIND("1.",[Version])), "Review 1"), OR(IF(ISNUMBER(FIND("2.",[Version])), "Review 2"), OR(IF(ISNUMBER(FIND("3.",[Version])), "Final")))))

      D Offline
      D Offline
      Dudestar
      wrote on last edited by
      #2

      Hello, Sharepoint formulas use the same syntax as Excel so you would have to nest your IFs to get the effect you want i.e. =IF(Criteria, Result, IF(Criteria, Result, IF(Criteria, Result, IF(... so your formula would look something like: =IF(ISNUMBER(FIND("0.",[Version])), "Draft", IF(ISNUMBER(FIND("1.",[Version])), "Review 1", IF(ISNUMBER(FIND("2.",[Version])), "Review 2", IF(ISNUMBER(FIND("3.",[Version])), "Final",""))))

      P 2 Replies Last reply
      0
      • D Dudestar

        Hello, Sharepoint formulas use the same syntax as Excel so you would have to nest your IFs to get the effect you want i.e. =IF(Criteria, Result, IF(Criteria, Result, IF(Criteria, Result, IF(... so your formula would look something like: =IF(ISNUMBER(FIND("0.",[Version])), "Draft", IF(ISNUMBER(FIND("1.",[Version])), "Review 1", IF(ISNUMBER(FIND("2.",[Version])), "Review 2", IF(ISNUMBER(FIND("3.",[Version])), "Final",""))))

        P Offline
        P Offline
        Phrone
        wrote on last edited by
        #3

        Thanks. That solved my problem.

        1 Reply Last reply
        0
        • D Dudestar

          Hello, Sharepoint formulas use the same syntax as Excel so you would have to nest your IFs to get the effect you want i.e. =IF(Criteria, Result, IF(Criteria, Result, IF(Criteria, Result, IF(... so your formula would look something like: =IF(ISNUMBER(FIND("0.",[Version])), "Draft", IF(ISNUMBER(FIND("1.",[Version])), "Review 1", IF(ISNUMBER(FIND("2.",[Version])), "Review 2", IF(ISNUMBER(FIND("3.",[Version])), "Final",""))))

          P Offline
          P Offline
          Phrone
          wrote on last edited by
          #4

          As said, the formula is working now, but.... When a file is changed, new major version etc, the formula returns blank. If I go to library settings > choose the column and saves again, without changing anything, it shows correct values in the column again. Why? And what can I do about it?

          D 1 Reply Last reply
          0
          • P Phrone

            As said, the formula is working now, but.... When a file is changed, new major version etc, the formula returns blank. If I go to library settings > choose the column and saves again, without changing anything, it shows correct values in the column again. Why? And what can I do about it?

            D Offline
            D Offline
            Dudestar
            wrote on last edited by
            #5

            Hello, I wasn't aware of the issue, tbh, but it would seem that system columns such as Modified, Version etc. get updated after the content of your list or doc lib. which is what's screwing your calculated column up. When you edit and resave your calculated column it performs the calculation again which is why you get the correct result again. If I can get to the bottom of it I'll post a fix/workaround.

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups