Event Receiver for lookup column value added should be updated in another column in same Sharepoint list - event-receiver

I am having the list named "XXX". In that list i have two columns named Status, which is the choice column and StatusLookup, which is lookup column. The both column should have the same choices values namely Open, Pending Approval, Cancelled. If add new item in sharepoint list, if i choose "Open" in Status column it should be automatically updated in StatusLookup column without any manual entry.
I need to know whether there is any way to update the StatusLookup column by choosing the value in Status column in Sharepoint list by using Event Receivers?
Can you please reply me as soon as possible?
Thanks,
Sugu.....

Sorry this is late but I think instead of a lookup column you want the second column to be a computed column. Then you want to make the formula be "=[choiceColumn]". The computed columns should then always automatically update to the value in the choice column.
Supposedly you can then create a lookup column on the computed column from another list but that didn't work for me (computed column wasn't availalbe for a lookup column) which is how I ultimately found this post. Let me know if you solved your problem.
-Rob

Related

Excel: Is it possible to have a running two column list on one page and have it transfer to a secondary tab?

I have a database tab which holds all my information for each item in my inventory. This is always changing as I add new inventory. I want to take certain information in that tab (columns A & B) and use it in a separate tab called stock inventory in columns A & B. When it transfers I would like a blank cells in columns C,D,E, and F. I did try VLOOKUP however, because column A on the database tab is repeated, when the information was transferred to the stock inventory tab it duplicated information instead of actual information. For example Column A may say "Scale" column B may say "abalone, there may be a second entry with the same information in column A but different information in column B. When it transfers to the stock inventory tab anytime it recognizes "scale" in the column A it would say Abalone. This is not what I want. I want to bring over actual information for column B even if column A is the same. Any help is appreciated.
To solve the problem of the repeated value in the VLOOKUP you could create helper column on the left of the first vlookup matrix column, with the formula =ROW()&A2, and use this value as key to be searched with vllokup instead of the value in A1: there will be no duplicates, as the value will be the concatenation of the row number and the name of the article.

SharePoint Lookup column on a Person column in a different list

I have 2 SharePoint lists. One list will be a list of employees that are required to perform a specific function. In this list, there will be a column type of Person that pulls from AD.
The 2nd list will be the data entry list; I want to have a lookup column in this list that references the Person column in the 1st list, but when I attempt to create the column, it is not showing the Person column from the 1st list as an option to select.
The intent is so that when users attempt to add a record in the 2nd list that they're only selecting employees that have been pre-defined in the 1st vs having to search AD.
Is it not possible to have a lookup column in one list reference a Person column in another?
Here is a workaround which you can have a try.
In the first list, create a new single text column named "Employee Name", and hide it from the view to avoid confusion. Add a flow to update this column with the display name of Person & Group field.
Here is an example flow I made to update all items in the list 1. Considering the issue of infinite loop for automatic triggers like when an item is created/modified. I used a manual trigger, when the flow runs, it will update all the items in the list. You can change it based on your requirements.
Then in List 2, just create a lookup column for the new "Employee Name" column. Then the job is done.

How to replace cell value based on a value in another column for status update?

I was trying to update the status of dozens of items everyday. There are two separate lists, one is for the current status, another is for the items to be updated.
Will there be a way to update the status in one column by referencing the item name in the second list? The item will change from "In progress" to either "completed" or "rejected".
'
picture of lists:
will need more information, for a simple formula it could be if you enter one list, second gets updated, but since formula would be there you can only update one list.
else vba would be needed.
criteria sorting wont be an issue, only issue what i see that either of the list will get auto update. one for inputing , second looking up values from the first list

Advanced Dynamic Validation Lists in Excel

While a number of other posts address similar issues, I was unable to find one that met my specific needs, using multiple sheets, etc.
What I need is the ability to select a value from a validation list in one column, and then have a second validation list be narrowed to just the values that can be selected based on the first validation list, and then a third that follows the same logic, etc.
So for example, I have 5 sheets:
Log - This sheet is used for input and will contain the columns that
have the dropdown validation lists.
Clients - This sheet is a two column list of clients. Column A has
the Client ID, column B has the Client Name.
Matters - This sheet is a three column list of Matters. Column A has
a Client ID, Column B has the Matter ID, column C has the Matter
Name.
Timekeepers - This sheet is a two column list of Timekeepers. Column
A has the Timekeeper ID, Column B has the Timekeeper Name.
Rates - This sheet is a three column list of Rates. Column A has a
Matter ID, Column B has a Timekeeper ID, Column C has a Numeric
Rate.
The log sheet:
Column A (Timekeeper) will be a simple validation list dropdown from which I will select a timekeeper (by name). This validation list is populated by the list on the Timekeeper sheet.
Column B (Client) will be another simple validation list dropdown from which I will select (by name) a client. This validation list is populated by the list on the Clients Sheet.
Column C (Matter) will have a validation list of Matters. This is the first dynamic validation list, as the list should only show the matters that belong the to client that was selected in Column B. We know which matters belong to a client by the Column A (Client ID) in the Matters sheet.
Column D (Rate) will simply display the rate for a given timekeeper/matter combination. We would now have the matter id and client id from the input into columns A and C, so we just need to locate the row in the Rates sheet that has that matter id and timekeeper id.
The solution can use VBScript or not, whatever you prefer. I'm a software developer, so I'm comfortable with VBScript, and I'm relatively familiar with Excel, so nested built in functions would be fine too.
Thanks in advance!
EDIT:
This workbook is going to be dynamically generated from a database, so I need to utilize an approach that can be generated programmatically.
The "Log" sheet will contain many rows where the user will select a Timekeeper from a dropdown, then select the Client from a dropdown (which will limit the Matter dropdown list) then select a matter from the Matter dropdown (which, combined with the selection in the timekeeper field will determine the "Rate").
The dropdowns will show the "name" values (i.e. timekeeper name, client name, matter name) but the limitations to subsequent lists based on these selections has to be based on the "ID" value for the selected "Name".
An example showing how to use subsequent list limitations would be most helpful. All of the examples I have seen show how to select one value and limit a second list, but I need to be able to have the selection from the second list limit a third list, the third list limit a fourth list, and finally, the "rate" is determined by what is selected in two of the lists.
The gist of dynamic validations is using =INDIRECT(SomeNamedRange) as the Source data in the List type of Data Validation.
Now, the hardest part is to dynamically generate this list of partners. For the sake of this example, I'll assume you have three sheets: Sheet1, Config, and Validation. I'm also assuming you are selecting a Partner based on a Region, as that is a simpler example.
Let's start with Validation.
Here's an example of my data:
Notice how I've sorted the data based on the most general criteria (Region, in this case). This will be important later on. Also notice that I've named A1:A26 as Validation.Region. I've also named B1:B26 as Validation.Partner.
Config is where your magic happens.
Moving over to the Config, we're going to need to add a list of unique regions, and an address describing where they're located. We'll name this address Region.Choices.
For this example, I used the COUNTIF function to find the last partner in the list. The exact formula was ="Config!$B$2:"&CELL("address";OFFSET(B$2;COUNTIF(B$2:B$230;"?*")-1;0)). Unfortunately, Excel doesn't have a built-in function for the sheet's name, so I had to hardcode that. I went ahead and hardcoded $B$2 to improve performance (maybe?), but you could do that dynamically too.
Sheet1 is where you'll be making your dynamic selection.
In this sheet, we have the following structure.
Take B4, name it "Region.Selected", and add Data Validation as a List of Source =INDIRECT(Region.Choices).
Creating the logic behind the dynamic drill down
Now go to Config, and replicate the contents of B1 on C1, making sure to alter the hardcoded $B$2). Finally, name Partner.Choices, and type in the following Array Formula in C2:C100:
=IF(Region.Selected="";OFFSET(Validation.Partner;1;0;COUNTA(Validation.Partner);1);OFFSET(Validation.Region;MATCH(Region.Selected;Validation.Region;0)-1;1;COUNTIF(Validation.Region;Region.Selected)))
Note: to add an Array Formula, select C2:C100 before typing the formula, and once you're done typing, hit Ctrl+Shift+Enter instead of Enter.
While it may seem convoluted at first, this is basically returning every Partner if no Region is selected, or returning the partners from a selected Region by calculating where it ends and starts and shifting one column to the right with OFFSET.
Wrapping up the dynamic drill down
Now go back to Sheet1, take C4, name it "Partner.Selected" (for consistency), and add Data Validation as a List of Source =INDIRECT(Partner.Choices), as displayed below:
For this example, I used the COUNTIF function to find the last partner in the list. The exact formula was ="Config!$C$2:"&CELL("address";OFFSET(C$2;COUNTIF(C$2:C$230;"?*")-1;0)). Unfortunately, Excel doesn't have a built-in function for the sheet's name, so I had to hardcode that. I went ahead and hardcoded $C$2 to improve performance, but you could do that dynamically too.
Now go ahead and test your dynamic validation! It should look like this:

Calculated column won't display when workflow is run

I have created a calculated column that pulls the text from another site column so I can display just the text. To achieve this I have created a SharePoint 2010 workflow which sets column B with colum A value. I then have a calculated column that will take the text from column B and strip the unnecessary characters and leave just what I want.
I have a workflow which finally takes the two calculated columns and replaces the value inside the Title column for the current item. I have the workflow kick off whenever a new item is created, changed etc. When I create an item it will change the title but the title displays Error;#256 - Error;#256. If I then run the workflow on the item again the correct values are inserted. So I thought the workflow wasn't waiting until the calculated columns were calculated before setting the Title so I modified my workflow as below but I still have this issue.
Laptops is passed onto LaptopString which then LaptopTextOnly is the calculated column that uses LaptopString to get the intended value I am looking for.
This was awhile ago but for anyone else having the issue, I resolved it by having the workflow wait for the calculated column to not contain the word 'error.'

Resources