Workflow Start Form - Default Lookup Value


Badge +2

I have a list of sessions with a lookup field titled Event.

Users need to run a workflow to copy the session and be given the opportunity to change the event or keep the same event that is associated to the original session being copied. So I have the event ID, but I don’t know what it is until the user selects a session to be copied.

 

The desired configuration is to have the selected session’s event already selected in the dropdown list so that if the user wants to change the event from Test Session 1 to Test Session 2 in the lookup field, once they click the dropdown arrow to change, Test Session 2 would be right there for them to select and they wouldn’t have to scroll in the list.

 

My configuration right now simply includes the current item event as the placeholder text, but because it’s placeholder text, it’s not actually selected and the user has to scroll to get to their choice. This is certainly a hack on my part. I have looked up and tried js based on forum postings, but I’m not strong in js and I’m lost.

 

Can someone please help guide me through exactly how to do this?


10 replies

Userlevel 5
Badge +14

is there any reason you connected lookup control to events list?

if you connected it to sessions list and Event field it would followed already select event value and provided list of all the events as well.

Badge +2

Thanks for the response. Very good question and the answer is simple - I'm a newbie at this. So...I went in and changed to the source to the sessions list, but I still don't know how to get it to have the event of the original session selected by default. My new configuration is shown below. When I start the workflow, as expected, the dropdown is just the full list of events from the sessions list lookup column with nothing selected. What do I need to change?

Badge +2

To make sure I'm clear on outcome though, the user should be able to choose a new event that may not exist in the sessions list yet. As long as the start form field will show events based on the event lookup and not just a list of events already associated to sessions, that works.

Userlevel 5
Badge +14

remove existing control from the form and drag&drop it from 'List Columns' left-hand pane.

it should configure links to list field automatically on its own

Badge +2

OK - got it! I just overdid it / had the wrong control in the first place. That's exactly what I needed.Thank you so much.

Badge +2

Marian, How do I set the selected event from the workflow start form to a variable?

Userlevel 5
Badge +14

the value is stored directly to list field (item property).

Badge +2

It's having the undesired effect of changing my original session. I only want to associate the newly created copy of the session to a different event. I want to leave the original item (being copied) as is, but allow the user to associate a new event, if desired. Is this possible?

Badge +2

I've attached an image of the result. I copied Session A, which WAS associated to Event 2. On workflow start form, I renamed session to be Session C and changed associated event to 1.

What I WANT to see here is the original session A with the retained event 2 and my new session C with event 1.

What it's doing instead is changing my original session event to event 1.

Userlevel 5
Badge +14

ah, I see.

then you are right, your original setup was correct from this point of view. you can not connect control to the list field directly if you do not want to change it.

but on the other hand lookup control do not support to configure default value. this is usually being done with some javascript.

Reply