Setting initial value on Edit Form from Ref column?

Hi, I've tried searching and found some threads that were close but still can't seem to get this one right. 

I have a Form, with a Slice behind it. This Form has a dropdown, which is a Ref type.

I can select a value from the dropdown and save with no issues. 

When a user opens the edit Form, I'd like the dropdown to default to the user. 

I've tried going to the column on the underlying data table and setting the "Initial Value" field, but nothing I've tried seems to work. 

Can someone confirm that "Initial Value" field is the correct one? I thought I'd find the right expression and then wrap it in a CONTEXT command to check the View name. 

Solved Solved
0 7 674
1 ACCEPTED SOLUTION

Right, you need an initial value, perhaps using CONTEXT as you suggested, and an appropriate ResetOnEdit.

View solution in original post

7 REPLIES 7

Initial Value only evaluates when a record is first being created. Unless you also use ResetOnEdit.

Thanks for replying Marc. 

In this case, the column value is blank and the user is to select from the drop down, save the record and from that point forward the column will always have a value. 

Is there any straightforward way for me to set a default for the drop down?  

Your posts seem to contradict each other. You want the column to autofill to the user, or you want the user to select a value from the dropdown?

Sorry for the confusion. 

The column dropdown has a list of users. When the user first navigates to the edit form, the value is blank. 

I'd like the column to have an initial value on the edit form of the user viewing it, yet allow the user to select another user in the drop down. 

So for example, if I were to edit, although the column is empty in the sheet, the dropdown would display my name "dbweb", and I could still select another user. Lets assume I discard my edit and don't save. 

Then if you edited the row, it would display your name "Marc_Dillon" but you could still select another user. 

Right, you need an initial value, perhaps using CONTEXT as you suggested, and an appropriate ResetOnEdit.

I think I'm following. So I could set Initial Value to be a the code that sets the column/dropdown to the user editing the record. 

And then add a CONTEXT check for the specific Edit view that toggles whether "Reset on edit" is enabled or not. 

I'll give that a try, thanks 

Thanks again @Marc_Dillon , this ended up working great!

Top Labels in this Space