Column edit constraint

Hi,
I have a table where you can edit/add. I have columns with drop-down values. If I select from the enum list the next column shouldnโ€™t be editable, but if i add a new enum value then the next column should be editable. Can someone help with the expression for this issue.

Thanks,
Surendra.

0 6 205
6 REPLIES 6

Aurelien
Google Developer Expert
Google Developer Expert

HI @Surendra_Vasudevan

Please have a look there

This is where to type your Yes/No expression for Show_If:


and for Editable_If:

Hi Aurelien,
Thanks for your reply. I get the concept of the show-if constraint, but my ask is I have a column where i can select an item from drop-down. Letโ€™s say I add a new item to the drop-down and only then i want the next column to be editable. I was wondering if there is a way or formula to do that. But i found a work around with that. It would be great if you have any other ideas.

Thanks.

OK, thanks for this further explanation.

I did not have this situation before, Iโ€™m afraid I canโ€™t help you on that.

Spontaneously, and assuming that the dropdown list:

  • comes from a column that I will designate as โ€œcolumnFromSourceTableโ€
  • and this columns belongs to a table named โ€œtableSourceNameโ€,
    I would use an expression like:
    editable_if:
NOT(
   IN([_THISROW].[columnEnumList], tableSourceName[columnFromSourceTable])
 )

But Iโ€™m only 50% confident into that solution.
Which workaround did you make ?

Hey thanks again for the help.
My Enum column is the key column, so obviously canโ€™t have duplicates. I added another column where it will give the count of items in the Enum column. Also i have numbered the rows. So, just gave the expression like rownum>total count (then editable).

Steve
Platinum 4
Platinum 4

Try this as the second columnโ€™s Editable? expresion:

NOT(
  IN(
    [enum-column],
    table[enum-column]
  )
)

Replacing enum-column (twice) with the name of the column containing the Enum value, and table with the name of the table to contain the row being edited in the form.

The IN(...) expression answers the question, โ€œis the enum-column column value in the form already present in the enum-column column of the table table?โ€ Wrapping that with NOT(...) inverts he question: โ€œis the column value not present?โ€

Note that this is the same as @Aurelienโ€™s suggestion above, I notice as I reread it. Oops!

See also:

Thanks Steve, it works.

Top Labels in this Space