Hello AppGini family,
I have a question that has probably already been asked and answered, but I can't find it.
I have a table that includes a "closed" field that is a radio button with the options of Yes and NO. This is a required field.
There is another field called "close_date". It is not required and default value is null or empty.
What I want to do is remove the Required parameter from the "closed" field and automatically update the field to "Yes" if the "close_date" field is a non null value and to "No" if the close_date field is a null value.
I hope someone can help.
Ray
Update Field Based on Another Field in Table
Re: Update Field Based on Another Field in Table
you can use calculated field to automatically assign closed to yes if closed_date is not null
closed_date as date, no default
closed as calculated field, read only with calculated field below :
SELECT IF(ISNULL( `TABLENAME`.`closed_date`),0,1)
FROM `TABLENAME`
WHERE `TABLENAME`.`id`='%ID%'
closed_date as date, no default
closed as calculated field, read only with calculated field below :
SELECT IF(ISNULL( `TABLENAME`.`closed_date`),0,1)
FROM `TABLENAME`
WHERE `TABLENAME`.`id`='%ID%'
Re: Update Field Based on Another Field in Table
Hi tchandra,
I have tried using the calculated field as you suggest, but it just leaves the field blank. I have changed the SELECT IF(ISNULL( `TABLENAME`.`closed_date`),0,1) to SELECT IF(ISNULL( `TABLENAME`.`closed_date`),No,Yes) and no luck.
Any ideas?
Thanks
I have tried using the calculated field as you suggest, but it just leaves the field blank. I have changed the SELECT IF(ISNULL( `TABLENAME`.`closed_date`),0,1) to SELECT IF(ISNULL( `TABLENAME`.`closed_date`),No,Yes) and no luck.
Any ideas?
Thanks
Re: Update Field Based on Another Field in Table
I got it figured out. Thank you!