Multiple condition for Lookup function

Hello,

We have any chance to define multiple condition for visibility of the fields in Lookup comment?

data.datasource = OptionField(ā€˜Data Source’, default=ā€œUSGSā€, options=[ā€œUSGSā€, ā€œEMSCā€], description=ā€œData Sourcesā€)

data.time_emsc = OptionField(ā€˜Time Range’, default=ā€œCurrent Dayā€, options=[ā€œSpecific Year-Monthā€,ā€œCurrent Dayā€, ā€œCurrent Monthā€], description=ā€œTime Range for the occured Earthquakesā€, visible = IsEqual(Lookup(ā€˜data.datasource’), ā€œEMSCā€))

date.start_date = DateField(ā€œStart Dateā€, visible=IsEqual(Lookup(ā€˜data.datasource’), ā€œEMSCā€))
date.end_date = DateField(ā€œEnd Dateā€ , visible=IsEqual(Lookup(ā€˜data.datasource’), ā€œEMSCā€))

I want to add two conditions from data.datasource and data.time_emcs fields for the date.start_date and date.end_date but I did not find the best way. Only And(IsEqual…) option is available but it wants to BooleanField for the second condition.

Can we do it with any way?

Thanks.

Hi Hakan,

Apart from a Lookup you can also use a function to determine the visibility of a field. See: User input, fields and buttons - Hide a field | VIKTOR Documentation.

Regards,

Raoul

1 Like