Hi,
I have a status field in form with open, wip and closed, when i open a form it needs to open with wip status.
I also have a checkbox to filter open, wip and closed records.
How can i give condition for both in query
Hi,
I have a status field in form with open, wip and closed, when i open a form it needs to open with wip status.
I also have a checkbox to filter open, wip and closed records.
How can i give condition for both in query
Have a look at InventQuarantineOrder form (for “View ended” check box implementation)
when i open a form its opening with wip status but when i do check in open checkbox its filtering both open and wip records
public void init()
{
super();
// statusrange= this.query().dataSourceTable(tablenum(SalesProjectionHeader)).addRange(fieldnum(SalesProjectionHeader,Status));
criteriaOpen = this.query().dataSourceTable(tablenum(SalesProjectionHeader)).addRange(fieldnum(SalesProjectionHeader,Status));
criteriawip = this.query().dataSourceTable(tablenum(SalesProjectionHeader)).addRange(fieldnum(SalesProjectionHeader,Status));
criteriaclosed = this.query().dataSourceTable(tablenum(SalesProjectionHeader)).addRange(fieldnum(SalesProjectionHeader,Status));
}
public void executeQuery()
{
//statusrange.value(strfmt('%1', queryValue(SalesProjectionStatus::WIP)));
if(showOpen==noyes::No)
{
criteriaOpen.value(strfmt('%1', queryValue(SalesProjectionStatus::WIP)));
}
else
{
criteriaOpen.value(strfmt('%1', queryValue(SalesProjectionStatus::Open)));
}
if(showinprocess==noyes::No)
{
criteriawip.value('');
}
else
{
criteriawip.value(strfmt('%1', queryValue(SalesProjectionStatus::WIP)));
}
if(showclosed==noyes::No)
{
criteriaclosed.value(strfmt('%1', queryValue(SalesProjectionStatus::WIP)));
}
else
{
criteriaclosed.value(strfmt('%1', queryValue(SalesProjectionStatus::Closed)));
}
super();
}
criteriaOpen = this.query().dataSourceTable(tablenum(SalesProjectionHeader)).addRange(fieldnum(SalesProjectionHeader,Status));
criteriawip = this.query().dataSourceTable(tablenum(SalesProjectionHeader)).addRange(fieldnum(SalesProjectionHeader,Status));
criteriaclosed = this.query().dataSourceTable(tablenum(SalesProjectionHeader)).addRange(fieldnum(SalesProjectionHeader,Status));
You don’t need three ranges on same field. Try with one range and change the value based on the check box selection.
when i try this its not filtering for multiple selection, can you give me a sample condition for multiselect
Will you be able to show your code?