I have two columns: โTimecard Approved?โ and โReject Reason.โ
The Supervisor reviews individual timecards and if anything is missing, they hit an action button - โReject Timecardโ - which sets the โTimecard Approved?โ column to โReject.โ
This was working as expected until I set the column โReject Reasonโ to required if โTimecard Approved?โ = โReject.โ
This now prevents the action from firing and shows the following error message once I hit the โReject Timecardโ action:
Is there a workaround for this?
@Dialect_Junk
What do you expect to happen when the action executes correctly other than recording โRejectedโ value to the respective column?
Thatโs the only action - set value of the column to โReject.โ
@Dialect_Junk
Try this expression with your Required_if
AND(
CONTEXT("ViewType")="form",
[Timecard Approved?] = "Reject"
)
Levent, I tried this expression. It allows me to set the column as โReject,โ however, the โReject Reasonโ column does not become required as desired.
Since the view type is a Detail, I guess it makes sense the column isnโt required since both conditions arenโt satisfied?
Just to clarify, I want to be able to hit the โReject Timecardโ action button setting the โTimecard Approved?โ column to โReject,โ and I want the โReject Reasonโ column required if โTimecard Approved?โ = โReject.โ
@Dialect_Junk
I believe itโs not possible to enable quick edit for a required column in a detail view
@Dialect_Junk
I would suggest this:
1.) Create a slice of this recordโs table which contains the [Key Column], [Timecard Approved?] and [Reject Reason] columns only. Set the slice to ADDS_AND_UPDATES mode only.
2.) Add a REF type FORM VIEW and assign this slice as a base table.
3.) Set Finishing View to TASK DETAIL
4a.) Set a Show_if expression like below to your [Timecard Approved?] column
IF(
CONTEXT("View") = "Your-Ref-Type-Form-View-Name",
FALSE,
TRUE
)
4b.) Set an Initial_Value expression like below to your [Timecard Approved?] column
IFS(
CONTEXT("View") = "Your-Ref-Type-Form-View-Name","Reject"
)
4c.) Set an Reset_if expression like below to your [Timecard Approved?] column
CONTEXT("View") = "Your-Ref-Type-Form-View-Name"
4d.) Set an Editable_if expression like below to your [Timecard Approved?] column
NOT(CONTEXT("View") = "Your-Ref-Type-Form-View-Name")
5.) Re-set the Required_if expression for [Reject Reason] column
[Timecard Approved?] = "Reject"
6.) Change your action button:
Do this > App: Go to another view within this app
Target > LINKTOROW([KeyColumnName], "Your-Ref-Type-Form-View-Name")
7.) And lastly remove [Reject Reason] from Quick Edit
This will simply launch the tableโs Form View with Edit mode, reset the [Timecard Approved?] columnโs and assign the value in the Initial Value property, your [Reject Reason] field will be mandatory to fill in and form saved.
Levent, thank you for taking the time to come up with this! Wow!
I had to roll the app out so I simply changed my โDetailโ view to a โFormโ view. Iโll have to try this very clever workaround on the next iteration of my app.
Again, thank you!!!
Youโre welcome
User | Count |
---|---|
39 | |
35 | |
29 | |
23 | |
18 |