I am new to AppGini and I've been reading most of the aid. But there are things that I find.
I wonder as modifying data in fields that already have values recorded is prevented. Ie allow editing only if the fields are empty.
Thank you very much for your time
Google translator
As I can prevent modification of a field if it already has a recorded value?
-
- AppGini Intern
- Posts: 19
- Joined: 2016-02-07 13:24
Re: As I can prevent modification of a field if it already has a recorded value?
you can modify only the name of field. if you try to change the type of field ,it should be larg scale of the same type
example :
in your application after inserting some integer values ,you found that you have some float numbers so in this case you can change the field type to float without any conflict. if you try reverse case ,it will confilit and change the recorded values.
also, don't try to change between two different types
example :
change type from varchar to timedate ?! it will set all old recorded values to null timedate value
example :
in your application after inserting some integer values ,you found that you have some float numbers so in this case you can change the field type to float without any conflict. if you try reverse case ,it will confilit and change the recorded values.
also, don't try to change between two different types
example :
change type from varchar to timedate ?! it will set all old recorded values to null timedate value
Re: As I can prevent modification of a field if it already has a recorded value?
What version of appgini are you using?
You can also use javascript to check the field and if there is data in it change the field to a readonly field for that session. If there is no data you can make sure the field is not set to read only.
You can use the filename-dv.js file you create and place it in the hooks folder to run the code to check for fields with data and change them as needed.
Here is a link with info to using the DOM:
http://www.w3schools.com/js/js_htmldom.asp
Hope this helps a bit.
Alan
You can also use javascript to check the field and if there is data in it change the field to a readonly field for that session. If there is no data you can make sure the field is not set to read only.
You can use the filename-dv.js file you create and place it in the hooks folder to run the code to check for fields with data and change them as needed.
Here is a link with info to using the DOM:
http://www.w3schools.com/js/js_htmldom.asp
Hope this helps a bit.
Alan
Calgary, Alberta, Canada - Using Appgini 5.50 -