auto select a value ​​from the list in the dropdown

FROM THIS ONEFROM THIS ONE

 

TO THIS ONETO THIS ONE

I have values ​​for list 1, 2, 3 and 4 from the same table with each having a connected list. in this case I use the formula in VALID IF.
normally, when column 1, 2 and 3 of the list are selected, the value in column 4 will automatically appear.
but, what I want is when column 4 is filled, the value from column 4 will automatically be stated, not just displayed. like the second picture below
anyone can help me please

@Steve 
@WillowMobileSys 

Solved Solved
1 7 202
1 ACCEPTED SOLUTION

Ok.  I see.  This is different than I understood.

So the data table POKJA is ALL combinations of the TYPE, COMPANY and MANUFACTURER??

You would want to set Initial Value of your POKJA column to:

SELECT(POKJA[POKJA], AND([Type] = [_THISROW].[TYPE],
[Company] = [_THISROW].[Company],
[Manufacturer] = [_THISROW].[Manufacturer]))

 Sorry, I was confused about what you needed!

View solution in original post

7 REPLIES 7


@deprokum wrote:

the value from column 4 will automatically be stated


You mean automatically selected?  For that you need to insert an Initial Value expression in that column.  Something like:

If(ISBLANK([_THIS]), COUNT(<<possible choices list>>) = 1,
    INDEX(<<possible choices list>>, 1),
    [_THIS]
)

Because the column is not showing as Required, I am assuming that you could save the row and then open it later for editing.  That is why there is the introduction of [_THIS].  You will also want to turn on the "Reset on edit" property.

NOTE: You may need to adjust the above expression depending on your needs and what is allowed when editing.

I hope this helps!

If(ISBLANK([_THIS]), COUNT(<<possible choices list>>) = 1,
    INDEX(<<possible choices list>>, 1),
    [_THIS]
)

the IF formula above has 4 arguments.

"[_THIS]" for which column? [POKJA] or else?

for Valid If: (for data source):

 

dB POKJA[POKJA]

 

 

I tried this in Initial Value:

 

If(ISBLANK([_THIS]),
  COUNT(dB POKJA[POKJA]) = 1,
    INDEX(dB POKJA[POKJA], 1)
)

 

but "This entry is invalid"

 

and I tried this Initial Value

 

If(ISBLANK(dB POKJA[POKJA]),
  COUNT(dB POKJA[POKJA]) = 1,    
    INDEX(dB POKJA[POKJA], 1)
)

 

just filled, not selected.

I mean, when column "TYPE", "COMPANY" and "MANUFACTURER" filled, column "POKJA" will fill and automatically selected. Cause if the value of the "TYPE" column is changed, then the value of the "POKJA" column will also change.

NOTE:  sorry for my bad English

I forgot the AND().  It should have been like this:

If(AND(ISBLANK([_THIS]), COUNT(<<possible choices list>>) = 1),
    INDEX(<<possible choices list>>, 1),
    [_THIS]
)

still can't automatically selected, just show value of the list, same as the first picture I sent

this is data table in spreadsheet

DB POKJA.png

VALID IF in column TYPE, COMPANY, MANUFACTURER and POKJA is:

DB POKJA[TYPE] <-for Column TYPE
DB POKJA[COMPANY] <-for Column COMPANY
DB POKJA[MANUFACTURER] <-for Column MANUFACTURER
DB POKJA[POKJA] <-for Column POKJA

I got  value for Column COMPANY and MANUFACTURER from INITIAL VALUE using LOOKUP() with another data table.

For Column POKJA it will show automatically list after Column TYPE is selected(manual), unfortunately, column POKJA just show without selected.

Ok.  I see.  This is different than I understood.

So the data table POKJA is ALL combinations of the TYPE, COMPANY and MANUFACTURER??

You would want to set Initial Value of your POKJA column to:

SELECT(POKJA[POKJA], AND([Type] = [_THISROW].[TYPE],
[Company] = [_THISROW].[Company],
[Manufacturer] = [_THISROW].[Manufacturer]))

 Sorry, I was confused about what you needed!

Excellent!
Finally, it works perfectly as expected.

Thanks for your assistance. May this be your ongoing charity in the future. Very useful knowledge. 

Thanks again. 🙏

Top Labels in this Space