SharePoint User Group UK

Share the knowledge!

Welcome to SharePoint User Group UK Sign in | Join | Help
in
Home Blogs Forums Photos Files Roller

Workflow in SPD

Last post 04-11-2008, 10:16 AM by Vishan. 10 replies.
Sort Posts: Previous Next
  •  04-10-2008, 9:26 AM 9699

    Workflow in SPD

    Hi, i have a room booking site where a user can book a room from a calender view, and i have a list named "Room", which lists the details of each room.

    In the list Room, i have a colomn called "Owner". this is efficively an Owner of a Room.

    e.g. Room A has an Owner named "Joe Blog" etc..

    However, in the calendar view a user can select which room they want to book.

    I would like a workflow to be generated, so when a user selects a room from the calendar view, (i.e Room A)  i would like the Owner of Room A to be alerted. And if the user Wishes to book Room B, then only the Room B Owner would be alerted.

    I have tried to do this workflow in SharePoint Designmer. I know it can work, but i dont no how.

    I have attached the workflow to the calender view 

    I set the workflow and action to "If Room = Room A" Then Send E-mail to......

    How do i get the users from the List called Rooms into the send e-mail...

    Because the workflow is attached to the calenedr List, i need to it pick up values from the Room List.

    How do i do that.

    Thanks.

     


    Vishan
  •  04-10-2008, 10:59 AM 9712 in reply to 9699

    Re: Workflow in SPD

    When you set the 'Send an E-Mail' action you should be able to set the To field to 'Workflow Lookup', then you can configure the lookup to extract the Owner from the Rooms list.

    Andrew Carter
    .Net & SharePoint
  •  04-10-2008, 11:19 AM 9716 in reply to 9712

    Re: Workflow in SPD

    Hi thanks for your reply. i am aware that the solution to my problem has something to do with a workflow lookup.

    However, as i stated in my first post, the workflow is attached to the claendar view. I would like the information to come from the List titled Room.  

    When i go to Wrokflow lookup. it says

    Source :Current Item -(which i dont want, because the current item is the calendar view, so i am able to change this to the item i want, which is Room).

    Then it asks me to Select a Field from the Room List, so i select "Owner... Everything is fine upto this stage,

    Then below i have to select a additional Field and Value... this is where i get stuck.... i dont know what values i have to put in there.

    Do i have to create a Workflow Variable?

    Please help..

    Thank you very much,


    Vishan
  •  04-10-2008, 12:17 PM 9718 in reply to 9716

    Re: Workflow in SPD

    You create a variable to store the Rooms Id and then use that in a lookup like below, but i you'd could just do what you have so far, by changing 'Current Item' to 'Workflow Lookup' then inputting something like

    Source: Rooms
    Field: Owner

    Field: Rooms:Room
    Value: Calender:Room

    Think of it like a SQL statment, SELECT <field>Owner FROM Rooms WHERE <field>Room = <value>"Room A"  in this case the current room name. Sorry if this is a little vauge, i'm not near a Sharepoint instance to try this out fully, but if memory serves me it should work along those lines.




    Andrew Carter
    .Net & SharePoint
  •  04-10-2008, 1:01 PM 9720 in reply to 9718

    Re: Workflow in SPD

    Hello. Thank you once again for your reply.

    Where you state

    Field: Rooms:Room

    Value: Calender:Room

    I dont have those options in the Dropdown to select Room : Room.

    When i click the Field dropdown i get several options ranging from

    Room: GUID

    Room:ID  along with all the other colomns i have in the list etc.. and more.

    I can see you are on the right lines though.

     


    Vishan
  •  04-10-2008, 1:08 PM 9721 in reply to 9720

    Re: Workflow in SPD

    No worries, you may not have Rooms:Room as i was just making up some names, you just need to us the field name from Room that you also have in Calender, they do not need to be the same name, they just need to have the same values to relate the two lists. You may be using Room:Title or Room:ID, hope this helps a little more



    Andrew Carter
    .Net & SharePoint
  •  04-10-2008, 1:25 PM 9723 in reply to 9721

    Re: Workflow in SPD

    Hi. the colomn in the Room list named Title is Room A

    And the colom in the caleneder named Room is Room A

    these two colomns have the same value... Yet the workflow does not work.

    it comes up with the error

    "The WF you defined is not guaranteed to return a single value. If more that one value is returned, only the first value wil lbe returned".


    Vishan
  •  04-10-2008, 1:43 PM 9726 in reply to 9723

    Re: Workflow in SPD

    I assume you just mean the warning during the Workflow wizrd? if so you can ignore it as long as you Room names are unique you will only return a single value, just knocked this up on a VM and it seems to work ok form me (and i got the warning above)


    Andrew Carter
    .Net & SharePoint
  •  04-10-2008, 2:09 PM 9728 in reply to 9726

    Re: Workflow in SPD

    Hope4sun wrote:
    I assume you just mean the warning during the Workflow wizrd? if so you can ignore it as long as you Room names are unique you will only return a single value, just knocked this up on a VM and it seems to work ok form me (and i got the warning above)

     

    :( no hope for the wiked lol.. i ignored the error message.....still no hope.. tried the room id and calender id.. sill no hope.


    Vishan
  •  04-10-2008, 3:25 PM 9732 in reply to 9728

    Re: Workflow in SPD

    Hi. Would it be possible if i could possible send u the stp file, and then you can  do the change for me.

    I never have undestood the workflow lookup. thanks

     


    Vishan
  •  04-11-2008, 10:16 AM 9741 in reply to 9732

    Re: Workflow in SPD

    Hi Andrew. Just wanted you to know that i have managed to get the workflow to work correcty.

    Thank you very much for explaing how the Workflow lookup works.....

    Is there a website where i can learn more about workflow lookups, and more about SharePoint Designer!.


    Vishan
View as RSS news feed in XML
Powered by Community Server, by Telligent Systems