- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2024 12:38 AM
Hello Team,
Need help for the below requirement.
- We have a draft(check box) field this field is updating through Save button when user click on the save button the draft fields gets true.
- By using the submit button the draft field is updating to false and form gets re-direct to list view of the table.
Here our client requirement is when the user click on the save button form fields gets editable. And when the user click on the submit button all fields gets read only
For this I have created one UI police when the draft field gets false through submit button all fields are getting read only.it is working based on the
Draft field.
But our client is asking when we click on the new button to create a new record all fields should be editable. But now it is in read only as draft field false initially.
How we can achieve this requirement ? Please assist me.
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2024 02:03 AM
Hi @Khalid9030
Please follow the these.
As you have requirement to make the field editable when user click on the save button form fields gets editable( draft(check box) field this field is updating through Save button) and when the user click on the submit button all fields gets read only
Create a UI policy that sets field edit ability based on conditions.
If Draft is true, allow editing.
If Draft is false and the form is not in 'New' mode, make fields read-only.
If the form is in 'New' mode, allow editing regardless of the Draft field.
i create two Ui policy
1. When draft is true make field editable ,but mark reverse if false
2. Create Ui policy when draft is false and check in Condition script whether record is new or not then mark the read-only depending on that
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful."
Thanks,
BK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2024 02:03 AM
Hi @Khalid9030
Please follow the these.
As you have requirement to make the field editable when user click on the save button form fields gets editable( draft(check box) field this field is updating through Save button) and when the user click on the submit button all fields gets read only
Create a UI policy that sets field edit ability based on conditions.
If Draft is true, allow editing.
If Draft is false and the form is not in 'New' mode, make fields read-only.
If the form is in 'New' mode, allow editing regardless of the Draft field.
i create two Ui policy
1. When draft is true make field editable ,but mark reverse if false
2. Create Ui policy when draft is false and check in Condition script whether record is new or not then mark the read-only depending on that
If my response proves useful, please indicate its helpfulness by selecting "Accept as Solution" and " Helpful."
Thanks,
BK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-30-2024 10:28 PM
requirement is changed, please help me for the below.
When we click the Submit button, the form redirects to the list view, and all fields should become read-only in both the list view and the form view. However, when the user clicks the Save button, all fields remain editable until the Submit button is pressed."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2024 02:15 AM
Is there any reason why you cannot set your Draft checkbox to true when you load the form of a new record? Then your UI Policy would work they way you want it to.
Another option is to use a State field that (unlike the checkbox which can only have two values: true/false) supports more options (e.g. new/draft/submitted). Then you would have greater control over your form and would also be able to add more states in the future if needed.
Blog: https://sys.properties | Telegram: https://t.me/sys_properties | LinkedIn: https://www.linkedin.com/in/slava-savitsky/

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-16-2024 03:48 AM - edited 07-16-2024 03:48 AM
Hi,
All through the platform the OOB UI action "Save" and "Submit" have the same function, Save to save changes and remain on the form, Submit saves the changes and take you to the previous place (form or list or whatever).
It feels a bit off that you with these requirements want to change this behaviour into something else.
Won't that cause confusion when using other parts of the platform?
I would recommend that you leave the UI actions out of this, and simply have a field on the form that allows for editing when checked/unchecked. Would be fairly simple to do with a UI policy.