Fri Nov 26, 2021 11:49 pm
Login Register Lost Password? Contact Us


Error when running logic for a condition that isn't met

Questions around writing code and queries

Tue Jul 27, 2021 6:34 pm Change Time Zone

I get the following error for the code below: "Error: Omitted parameter 2 has no default value (8, 123), 2062, ". Since #TEXT(pCarrierGeoStateField) is '' because I didn't pass that parameter into my_mac, it shouldn't be trying to call Monthly_Shop_Report_Datacube.modZipStates.macGetStateSet(pCarrierGeoDS, pCarrierGeoStateField) and I shouldn't be getting this error. Can someone a) tell me what I am misunderstanding about ECL, b) tell me a workaround?

my_mac(pCarrierGeoDS = '', pCarrierGeoZipField = '', pCarrierGeoStateField = '') := FUNCTIONMACRO

d_shop00 := choosen(Monthly_Shop_Report_Datacube.Files('202106').d_cumulative_auto_shop_summary, 100);

d_shop0 :=
MAP(#TEXT(pCarrierGeoDS) <> '' AND #TEXT(pCarrierGeoZipField) <> '' AND #TEXT(pCarrierGeoStateField) <> '' =>
d_shop00(idl_shop_zip in Monthly_Shop_Report_Datacube.modZipStates.macGetZipSet(pCarrierGeoDS, pCarrierGeoZipField)
AND idl_shop_state in Monthly_Shop_Report_Datacube.modZipStates.macGetStateSet(pCarrierGeoDS, pCarrierGeoStateField)),
// #TEXT(pCarrierGeoDS) <> '' AND #TEXT(pCarrierGeoZipField) <> '' =>
// d_shop00(idl_shop_zip in Monthly_Shop_Report_Datacube.modZipStates.macGetZipSet(pCarrierGeoDS, pCarrierGeoZipField)),
// #TEXT(pCarrierGeoDS) <> '' AND #TEXT(pCarrierGeoStateField) <> '' =>
// d_shop00(idl_shop_state in Monthly_Shop_Report_Datacube.modZipStates.macGetStateSet(pCarrierGeoDS, pCarrierGeoStateField)),
d_shop00(idl_shop_state IN Monthly_Shop_Report_Datacube.Files().us_states_plus_dc));

RETURN d_shop0;

ENDMACRO;

my_mac(Monthly_Shop_Report_Datacube.Files().i_zipcityst, Zip5);


This is W20210727-142504 on Alpha Dev if more info is needed.
janet.anderson
 
Posts: 47
Joined: Wed Jul 17, 2013 5:31 pm

Mon Aug 09, 2021 5:01 pm Change Time Zone

Janet,

No clue here. I think a JIRA is in order.

HTH,

Richard
rtaylor
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 1604
Joined: Wed Oct 26, 2011 7:40 pm

Wed Aug 11, 2021 1:08 pm Change Time Zone

Can you please provide the link to submit a JIRA ticket for HPCC?
janet.anderson
 
Posts: 47
Joined: Wed Jul 17, 2013 5:31 pm

Wed Aug 11, 2021 1:39 pm Change Time Zone

Janet,

Here's the link: http://track.hpccsystems.com

HTH,

Richard
rtaylor
Community Advisory Board Member
Community Advisory Board Member
 
Posts: 1604
Joined: Wed Oct 26, 2011 7:40 pm


Return to Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron