logo

Warning: The forum is now for consultation only. Please use GitHub Discussions to post any questions or comments.


Welcome Guest ! To enable all features please Login or Register.

Notification

Icon
Error

Options
Go to last post Go to first unread
MyxomopeC  
#1 Posted : Wednesday, January 17, 2024 1:52:20 PM(UTC)
MyxomopeC

Rank: Newbie

Groups: Registered
Joined: 1/17/2024(UTC)
Posts: 2
Bulgaria

Greetings all,

I`m very very new to this tool ( be gentle :) ) and I would like to ask you something that I`m struggling with.

This is the filtration part of the code into my SQL Model:
Quote:
WHERE
ARCHIVE_DATE >= TRUNC(TO_DATE({CommonRestriction_START_DATE},'yyyy-mm-dd HH24:MI:SS'))
AND ARCHIVE_DATE < TRUNC(TO_DATE({CommonRestriction_END_DATE},'yyyy-mm-dd HH24:MI:SS'))
AND {CommonRestriction_PRODUCT_NAME}


Filtration on DATE fields works flawlessly.

I would like CommonRestriction_PRODUCT_NAME values to be updated inside the filter every time the Dates changed.
What I did:
1. I`ve created custom enumerated list and place it in Advanced-> Custom Enumerated
2. Inside that list I`ve placed SELECT DISTINCT PRODUCT_NAME FROM TMP WHERE
ARCHIVE_DATE >= TRUNC(TO_DATE({CommonRestriction_START_DATE},'yyyy-mm-dd HH24:MI:SS'))
AND ARCHIVE_DATE < TRUNC(TO_DATE({CommonRestriction_END_DATE},'yyyy-mm-dd HH24:MI:SS')).

What I`m expecting to happen is when I change the dates I will have different number of records inside the PRODUCT filter.

Could you please help me resolve that situation ?

Regards.
epf  
#2 Posted : Wednesday, January 17, 2024 2:34:55 PM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 1,209
Switzerland

Thanks: 14 times
Was thanked: 206 time(s) in 199 post(s)
well, it is already an advanced feature.
You should not use Common_Restrictions in an enum list definition.

Dynamic values for enum is only possible if it depends from values from other enums.
Please check sample "09-Enumerated List - Dynamic Display.srex"

So to make it work, you should have an enum defined for start_date and end_date restrictions (don't know if it is possible),
then to reference them in 'SQL Select Statement for prompted restriction' (check sample for 'Product Name' in Northwind)
otherwise it will be difficult to achieve what you want.

MyxomopeC  
#3 Posted : Wednesday, January 17, 2024 2:57:34 PM(UTC)
MyxomopeC

Rank: Newbie

Groups: Registered
Joined: 1/17/2024(UTC)
Posts: 2
Bulgaria

Originally Posted by: epf Go to Quoted Post
well, it is already an advanced feature.
You should not use Common_Restrictions in an enum list definition.

Dynamic values for enum is only possible if it depends from values from other enums.
Please check sample "09-Enumerated List - Dynamic Display.srex"

So to make it work, you should have an enum defined for start_date and end_date restrictions (don't know if it is possible),
then to reference them in 'SQL Select Statement for prompted restriction' (check sample for 'Product Name' in Northwind)
otherwise it will be difficult to achieve what you want.



Thank you for your reply.

When you said "(don't know if it is possible)" do you mean it not possible in general in Seal OR in order to acheave it I should have calendar table ?

Regards.
epf  
#4 Posted : Thursday, January 18, 2024 1:55:06 PM(UTC)
epf

Rank: Administration

Groups: Administrators
Joined: 12/20/2013(UTC)
Posts: 1,209
Switzerland

Thanks: 14 times
Was thanked: 206 time(s) in 199 post(s)
I mean that the dynamic enum for a restriction will be refreshed only when another enum is modified -> an event is sent to the server to update the values of the dynamic enum.
This is not done for a normal date, numeric or string restriction so it will not work.
Could be enhance in a future version.
Users browsing this topic
Guest (2)
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.