Can I do something like IF BO.ATTR WAS CHANGED THEN SaveForm
Thanks
Bruce
Can I have a RULE save a form?
-
- Posts: 1460
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Can I have a RULE save a form?
I think this is covered by the 8.1 COMMIT transaction functionality.
I have not found a way to do it quietly (using check boxes and save when changed produces a prompt to the user)
I have not found a way to do it quietly (using check boxes and save when changed produces a prompt to the user)
Re: Can I have a RULE save a form?
What about the setting, "If value was changed then save form" This will save the form immediately if the value was changed.
Roger Ross
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.7 (build 3025) ~ MS-SQL ~ Windows 10 ~
AwareIM 8.5 (build 2828) ~ MS-SQL ~ Windows 10 ~
Re: Can I have a RULE save a form?
Really Roger? I didn't know there is a SAVE FORM command.
Bruce
Bruce
-
- Posts: 1460
- Joined: Tue Jan 24, 2017 5:51 am
- Location: 'Stralya
Re: Can I have a RULE save a form?
It’s not a function Bruce, it’s a flag on Yes/No attributes (and drop downs I think). My experience with it though is that it produces a prompt to the user “Do you want to save Yes/No/Cancel”BLOMASKY wrote:Really Roger? I didn't know there is a SAVE FORM command.
Bruce
Which is what I was trying to say in my original response - if you want the form to quietly save this won’t do it. Unless I have managed to use it incorrectly (always possible).
Re: Can I have a RULE save a form?
The problem is, I need it to save when I edit a text field. hummm, back to the drawing board
-
- Posts: 619
- Joined: Wed Jun 17, 2015 11:16 pm
- Location: Omaha, Nebraska
- Contact:
Re: Can I have a RULE save a form?
Rule no, script yes.
VocalDay Solutions - Agility - Predictability - Quality
We specialize in enabling business through the innovative use of technology.
AwareIM app with beautiful UI/UX - https://screencast-o-matic.com/watch/crfUrrVeB3t
We specialize in enabling business through the innovative use of technology.
AwareIM app with beautiful UI/UX - https://screencast-o-matic.com/watch/crfUrrVeB3t
Re: Can I have a RULE save a form?
John, when you say script can save, are you suggesting I add some Javascript to the Render script of the form, to trap when a field loses focus and then do a parser.save_form()?
Bruce
Bruce
-
- Posts: 619
- Joined: Wed Jun 17, 2015 11:16 pm
- Location: Omaha, Nebraska
- Contact:
Re: Can I have a RULE save a form?
Exactamundo!
VocalDay Solutions - Agility - Predictability - Quality
We specialize in enabling business through the innovative use of technology.
AwareIM app with beautiful UI/UX - https://screencast-o-matic.com/watch/crfUrrVeB3t
We specialize in enabling business through the innovative use of technology.
AwareIM app with beautiful UI/UX - https://screencast-o-matic.com/watch/crfUrrVeB3t
Re: Can I have a RULE save a form?
IF BO.ATTR WAS CHANGED Then UPDATE BOCan I do something like IF BO.ATTR WAS CHANGED THEN SaveForm
Re: Can I have a RULE save a form?
I've used this and works!ACDC wrote:IF BO.ATTR WAS CHANGED Then UPDATE BOCan I do something like IF BO.ATTR WAS CHANGED THEN SaveForm
Re: Can I have a RULE save a form?
Humm, I will have to test that. Reading the docs tells me that:
The UPDATE action invokes evaluation of rules attached to the specified business object (provided that there are any)
Doesn't say anything about updating the database, but I should know the answer to that soonish.
Bruce
The UPDATE action invokes evaluation of rules attached to the specified business object (provided that there are any)
Doesn't say anything about updating the database, but I should know the answer to that soonish.
Bruce
Re: Can I have a RULE save a form?
Bruce, I use it for both scenarios. Sometime I want to force the rule evaluation to take place, so I use update, and also for for cases when I change some attribute in a process, I follow it up with update.BLOMASKY wrote:Humm, I will have to test that. Reading the docs tells me that:
The UPDATE action invokes evaluation of rules attached to the specified business object (provided that there are any)
Doesn't say anything about updating the database, but I should know the answer to that soonish.
Bruce
Re: Can I have a RULE save a form?
Ben -- I don't get how you were able to use UPDATED for Bruce's user case.
If I understand it right, when a user if on a Form, Bruce wants to save the form if a certain text field value WAS CHANGED. I'm assuming Bruce wants to save it dynamically while the user is still on the Form and has not clicked any buttons to save the Form.
To test UPDATE theory, I added two attributes to RegularUser, Test1 and Test2.
Then I added a dynamic rule:
If RegularUser.Test1 WAS CHANGED Then
RegularUser.Test2=RegularUser.Test1
UPDATE RegularUser
When testing, I tried to update RegularUser.Test1 and tab through it hoping it would update the Test2 value and commit the values to the database.
I got an internal error.
If I understand it right, when a user if on a Form, Bruce wants to save the form if a certain text field value WAS CHANGED. I'm assuming Bruce wants to save it dynamically while the user is still on the Form and has not clicked any buttons to save the Form.
To test UPDATE theory, I added two attributes to RegularUser, Test1 and Test2.
Then I added a dynamic rule:
If RegularUser.Test1 WAS CHANGED Then
RegularUser.Test2=RegularUser.Test1
UPDATE RegularUser
When testing, I tried to update RegularUser.Test1 and tab through it hoping it would update the Test2 value and commit the values to the database.
I got an internal error.
Tom - V8.8 build 3137 - MySql / PostGres
Re: Can I have a RULE save a form?
If this is the case, you're right, my way doesn't work. It requires a client JS to make an AJAX call to the server for update, which the SAVE button is the best way to go about it.tford wrote:Ben -- I don't get how you were able to use UPDATED for Bruce's user case.
If I understand it right, when a user if on a Form, Bruce wants to save the form if a certain text field value WAS CHANGED. I'm assuming Bruce wants to save it dynamically while the user is still on the Form and has not clicked any buttons to save the Form.