The groups are the worst part of data rules. You can hit the overflow on the condition row and move things from one group to another and if you move everything out of a group I think it goes away automatically or you could delete it.
I guess the groups do allow you to get pretty complicated with conditions, but getting them to do what you want is awful.
When I tried this approach it switched all my ORs to ANDs. I guess the OR is what is forcing all the extra groups. I am going to try to ignore them.
I am initializing some fields so they work with my data rule. When I initialize my date field, I would like it to default to today’s date. Right now I have this, which populates 12/31/2024.
What value do I put in the “Value” box to populate today’s date? Or do I need that Expression box?
I usually just put null in the expression.
How does null return todays date?
My reading comprehension is clearly low. LOL
You can use the value and there should be a “Today” value in the Constant data view.
I left Expression empty and tried these values for the “Value” field:
"Constant.Today"
"Constant.Today()"
"Constant_Today"
"Today"
I can see the Constant dv in debugger. I can see it has a valid date value for Today. I just need to tuck that value into the initialized field. Just like I initialized partnum to 0. I did it in the same row-update. I still don’t get todays date to populate on load. Is there a way to default the value of the combo box without initializing it that way?
{Constant.Today}
When I type that into my Value JSON editor, and click save, it doesn’t save it and just reverts to “”.
Wrap it in quotes.
That was it! Thank you! I am never going to get this.
It’ll come with repetition.
lol at Kevin throwing the save harbor on that
I want to modify the disabled status of another button. The Edit Button is disabled by default, and should only be enabled when a user clicks a row in the grid. I already have the dvOJI rowchanged event to populate the form controls when I click on a row. Now I just want to enable that edit button when I click on a row (after I load the data). I tried with a property-set widget, that didn’t work. Do I need another data rule to modify the enabled status of a button, or can I do it from an event?
Property set widget did the trick. As always, syntax is the devil.
To set a button disabled status, create a property-set widget, set the component ID to the id of the control. Set the property prop = disabled, value = false (no quotes or braces).
The data rule check for blanks is not working on my date field. It is part of the condition stack, and the rest of the conditions work perfectly. Do I need another condition to check for a blank date? Do I have to initialize my date with a value and then check for the value instead of a blank? I have tried various versions of these approaches and haven’t found the magic combination.
The disconnected rules vs events drudgery is insane
Are you initializing the myDate field anywhere? Or did you create it as a field in the Transview dataview? If it’s not listed on the Transview Dataview or initialized somewhere, it doesn’t exist until there’s a date entered into the box so the rule can’t check to see what the value of it is.