How do i get to the data while doing resource create?
I'm trying to change some select field options based another selection. During edit I can use $record, but that's always null during create.
Solution:Jump to solution
Probably using $get to get the value of the other field. Then you can do what you need with the value.
11 Replies
This is obviously a relationship, so you can’t do that on create. You would have to return a default set of options from the Partner table for this to work on create.
I can still resolve from the selected id. So what's the injection for the data during create?
There's no default since I'm pulling the options from Stripe based on the account selected.
Solution
Probably using $get to get the value of the other field. Then you can do what you need with the value.
Thank you, I forgot about that one since I primarily used Forms by itself until recently.
So,
probably easier to just use null coalescing
Whatever works for you.
Cheers.
Just saying the $operation is how you can determine what process you’re in. If you need it. The ternary could start to look gross if it has to make a call or query to get the data. 🙂
no ternary needed
oops, that's not quite right