9
Views
5
Comments
How can make activating voting stop when end date < current date
Application Type
Reactive

How can make activating voting stop when end date < current date    


As in the OML  attachment

demo.oml

Rank: #287

HI andrew mahfouz

In addition to Rui's reply, It just prevents you to edit the active property.

But I can see you already add the filter to the voting screen's GetRounds aggregate,

So, the user can't vote for the expired round. 

Kindly Regards


Rank: #1399

That's true 

But in screen voting round the status  activaing not change i need change it how can do it 

Rank: #510

Hi Andrew,

You could set the enable property of the switch widget to:

GetRounds.List.Current.VotingRound.EndDate < CurrDate()

Is this what you need?

Best regards,

Kadu Borges


Rank: #287

Hi andrew

Sorry, I don't understand why you stick to this issue. The active and period are two different conditions.

If you just want to show the active in the screen, then you can try kadu's reply.
But it will not change the entity automatically.

Regards

Rank: #510

I think I get It.

The problem is that the voting is ended due to EndDate < CurrDate(), but the switch is exhibiting an active status due to the IsActive property, which is still True.

Am I right?

In order to overcome this issue, you could use a workaround.

1 - Enclose the switch widget inside an If.
2 - Set the If condition to

GetRounds.List.Current.VotingRound.EndDate >= CurrDate()

3 - In True, let the original switch as it is now.
4 - In False, put another switch with a local variable set to False and the Enabled property also set to False.

Hope It could help

Regards