Results 1 to 4 of 4

Thread: Problem of recovery value of a field in WSS

  1. #1
    Join Date
    Apr 2010
    Posts
    124

    Problem of recovery value of a field in WSS

    I have a list summarizing problems SP stores. This list itself is composed of fields of type "Search" allows me to list the values contained in another SP list (for example the name of the store, the affected radius). Everything works perfectly! By cons, when I use in developing a webpart my field "store name", I get value as a concatenation of the ID and value. Can anyone tell me how to retrieve the value and only value? Here is my retrieval code in a datatable:
    dr ["Name Shop"] = item ["Name Shop"]. ToString ();
    If you have the solution then let me know, I will be waiting for the related reply and thank you in advance for any related solution.

  2. #2
    Join Date
    May 2009
    Posts
    527

    Re: Problem of recovery value of a field in WSS

    Solution for the problem that you are facing is really simple, you just need to insert following code for this. I mean to say that you have to use this code for solving your problem.
    Web.Lists SPList list = ["Probleme_Magasin"];
    SPListItem problem list.Items = [0];
    SPFieldLookupValue lookupMagasin = new SPFieldLookupValue (problem ["Store Name"]. ToString ());
    int = lookupMagasinID lookupMagasin.LookupId;
    string = lookupMagasinValue lookupMagasin.LookupValue;

  3. #3
    Join Date
    Apr 2009
    Posts
    488

    Re: Problem of recovery value of a field in WSS

    I had the same problem and the solution you propose solves it well. One more thing you can also try this Public static GetLookUpString (string LookupValue)
    {
    if (LookupValue.Contains (";#")) return LookupValue.Subrtring (LookupValue.IndexOf (";#") + 2));
    else return (LookupValue);
    }
    SPFieldLookupValue lookupMagasin = new SPFieldLookupValue (problem ["Store Name"]. ToString ());
    The value is not within the expected range. I tried to put "Title", "Title", "Link Title" ... but nothing changes.

  4. #4
    Join Date
    May 2009
    Posts
    539

    Re: Problem of recovery value of a field in WSS

    The code you have given in the above reply only works for columns of type Lookup and as said it works fine in this case. To better understand your problem, could give me the value of problem ["Store Name"]. ToString () and the type of the column? In an emergency, it is not very clean, I removed my string all that is before the; I will test next week your solution as this problem may occur again soon. My field is type Lookup. I come back to you shortly with a new problem if I am getting any.

Similar Threads

  1. Problem writing creating recovery disc in Recovery Manager
    By SajalSOFT in forum Windows Software
    Replies: 6
    Last Post: 11-09-2010, 02:24 AM
  2. Java - static field problem
    By Miles Runner in forum Software Development
    Replies: 5
    Last Post: 02-03-2010, 09:48 AM
  3. Multi Field value field in Microsoft Access
    By Erubiel in forum Windows Software
    Replies: 3
    Last Post: 20-11-2009, 12:55 AM
  4. Reinstallation problem from recovery DVD
    By KADEEM in forum Operating Systems
    Replies: 4
    Last Post: 29-10-2009, 05:21 PM
  5. Problem recovery matrix in C
    By Rilex in forum Software Development
    Replies: 3
    Last Post: 07-05-2009, 11:53 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,914,286.15987 seconds with 17 queries