#mandatory fields

1 messages · Page 1 of 1 (latest)

real steppe
#

I think you would reference the field if

#

There's still something I don't get, sorry: can you please enumerate all the cases you want to considerate with the two fields ?

field1 is mandatory, field2 is optional
Example:

  1. if field1 and field2 are set
  2. If field1 is set and field2 not set
    What am I missing ?
tepid kraken
#

If field 1 and field2 are set I’ll go with field2 and ignore field 1 but I don’t want to allow both field 1 and field2 are missing

#

If field1 is set I’ll derive field2 that’s ok

tepid kraken
real steppe
real steppe
tepid kraken
#

Yes!

#

But we both are missing - I can’t proceed in that case I’d like to throw error

real steppe
tepid kraken
#

the only way i see is to fix is yo handle it in script. 🙃

real steppe
#

By always referencing the result key, it would error in case neither f1 and f2 are not concrete

#

The key is to use a third variable always referenced and whose concreteness is conditional on the concreteness of the two. Would that work ?

tepid kraken
#

Ah! That makes sense.

#

If I refer the third variable then it’ll just say I can’t find variable ist it ? How would I tell the user the variables are missing ?

real steppe
#

When evaluating the plan, we check if the key is not to be filled by the runtime, if it is not, then we make sure it is concrete. Otherwise it fails (pre-run)

tepid kraken
#

That sounds reasonable lemme check it il get back

#

Thanks!!!

real steppe
#

With pleasure, don't hesitate to ping 😇