Bug 7695

iseditable() 23 May, 2022

mike S
19 December, 2021
Product: PowerBuilder Category: DataWindow
Version: 2019 R3 Build: 2703
Classification: Enhancement Publishing: Public
Priority: P4
Status: Closed Reason: RECORDED AS ENHANCEMENT
Appeon Product 23 May, 2022
#4
Hi Mike,

Thank you for submitting the ticket.  


We now acknowledge this ticket to be an enhancement request and will record and track it internally in our enhancement management system. At the same time, we are closing the ticket here because this support system is for handling standard support services but not for maintaining enhancement requests.  

Please note that despite its "Closed" status, you are welcome to come back here and leave further comments or query the relevant development progress on this ticket.  


Thanks,

Julie
Kai Zhao @Appeon 19 December, 2021
#3
Hi Mike,

Thanks for your valuable suggestion. We will submit this feature to our development to further analyze the issue. It will take some time to reach a conclusion. We will keep you updated!

Currently, you can use an expression like the one below to judge if the column is editable. You can replace “#1” with the correct column id or column name, please note that when #1.protect is an expression and describe also returns an expression, then this result may be incorrect.

if ( describe("DataWindow.ReadOnly") = 'yes' or describe("#1.edit.displayonly") = 'yes' or describe(  "#1.tabsequence") = '0' or describe( "#1.protect") = '1' , 0, 1)

Regards,
Kai
mike S 19 December, 2021
#2
lol, yes, tabsequence / tab value!
Miguel Leeuwe 19 December, 2021
#1
Great suggestion Mike!
I guess that with "1) has a tag value greater than 0", you mean "1) has a tabsequence value greater than 0" ?
regards.
mike S 19 December, 2021
*Phenomenon:
need a datawindow function to return true/false as to whether the column is editable, something like iseditable().  This is a functon on the dwo not the control: we need to call it from a datawindow expression.

This will return true for a column if the following is true:
1) has a tag value greater than 0
2) protect expression evaluates to 0
3) edit.displayonly value must be No
4)  the DataWindow.ReadOnly value must be no.

Any of those values may change at runtime in code.  This is particularly important for any systems that use a security module that changes those values at runtime.

One of the primary uses of this is to enable developers provide visual feedback to users as to whether they can click or tab into a column (usually color change and/or  pointer change).  The display only value is a bit weird for that since you can click into a column in that case, you just can't change values.   

This has nothing to do with whether the datawindow will update the database value (updateable), just whether a user can change the value.

*Reproduce Steps:


Remarks:
OS:
All
Platform:
Database Type:
Database Version: