on 2022 Mar 25 8:06 AM
Hello,
I would like to make one of the table cell editable based on a condition. I defined a custom event and wrote the code below;
from System import DateTime
from Scripting.QuoteTables import AccessLevel
control = False
quoteTable = Quote.QuoteTables['Delivery_Dates']
for row in quoteTable.Rows:
control = False
for cell in row.Cells:
if cell.ColumnName == 'Delivery_Date':
if cell.Value < DateTime.Now:
control = True
if cell.ColumnName == 'Revised_Delivery_Date' and control == True:
cell.AccessLevel = AccessLevel.Editable
But cell is still not editable even though I changed it's Access Level.
Any ideas what I am doing wrong?
Best regards.
Request clarification before answering.
Hello,
In the quote table, I wouldn't be able to set the cell as read-only. Here is the snippet
data= context.Quote.QuoteTables['BASE_TABLE']
for rows in data.Rows:
for cell in row.Cells:
if(cell.ColumnName == 'status' 😞
cell.AccessLevel = AccessLevel.ReadOnly
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
10 | |
2 | |
2 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 | |
1 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.