Question

HimanshuGoyal on Wed, 03 Aug 2016 12:42:11


Hi,

I have a column in a list which stores the status of an item (e.g. pending review, pending approval etc.).

There are around 10 possible status of an item. In case if status text needs a change then lot of rules have to be changed.

I want to create a status list which will store all status codes and their description (e.g. 1 for pending review).

I will set the status code when certain actions are performed and then show the status description from status table which matches the status code of the item.

I tried but this is not working. Status description shows a blank value always. Can somebody guide please? Every time the form is opened it should show the status description at run-time from status list.

Regards,

Himanshu




Sponsored



Replies

Alex Brassington on Wed, 03 Aug 2016 13:59:14


Have you looked at a lookup list? That lets you pick from a single value in a list and it can then display related text values.

Rajesh.Sitaraman on Wed, 03 Aug 2016 14:00:14


When you create the status lookup column in your list, along with the status code, add description also as an additional field like below. Status description will change based on your status code selection.

HimanshuGoyal on Wed, 03 Aug 2016 14:19:51


Yes, I have done that but the problem is when I open the form, it shows a blank value. I want the status description to be set automatically (and lookup will be disabled always).

HimanshuGoyal on Wed, 03 Aug 2016 14:25:09


Yes, I have done that but the problem is when I open the form, it shows a blank value. I want the status description to be set automatically (and lookup will be disabled always).

HimanshuGoyal on Wed, 03 Aug 2016 15:05:05


Also, suppose an item is in 'Pending Approval' status. If somebody logs into SharePoint who is not supposed to approve then I want to display a text somewhere on the screen as below:

You are not authorized to approve this item.

Is there any way to accomplish this? There will be many such scenarios.


Chris yuri on Thu, 04 Aug 2016 06:24:51


Hi Himanshumhm,

If you want to set the field automatically when form loading, please use InfoPath rules and filters to achieve it.

You can create another data connection to connect to status list. Use rule to filter the data from status list based on the status column in the main list.

The link is for InfoPath 2007, but it's the same with SP 2010. 

http://www.bizsupportonline.net/infopath2007/how-to-vlookup-infopath-look-up-data-sharepoint-list-rules-filters.htm

Best Regards,

CY

HimanshuGoyal on Thu, 04 Aug 2016 07:39:42


Hi,

My requirement is slightly different. There will be no action from user's side. As per the status code (hidden),  user should be able to see its description (from another list matching with status code in current list) whenever the form is opened.


Alex Brassington on Thu, 04 Aug 2016 08:06:47


Set a default value and then use JavaScript to set the field to be read only.

Chris yuri on Mon, 15 Aug 2016 09:26:07


Hi Himanshumhm,

You can set the field as read-only in InfoPath. Right click the field properties.

Best Regards,

CY