Skip to content

Commit

Permalink
fix(fct_setnodefromarc): enable the function to work with selected fe…
Browse files Browse the repository at this point in the history
…atures
  • Loading branch information
mguzman14 committed Aug 27, 2024
1 parent b442f4b commit 1144b62
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions utils/fct/gw_fct_setnodefromarc.sql
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,9 @@ v_nodecat_id text;
v_arclist json;
v_count integer;
v_node_id text;
v_selection_mode text;
v_id text;
v_querytext TEXT;

BEGIN

Expand All @@ -71,6 +74,23 @@ BEGIN
v_builtdate := ((p_data ->>'data')::json->>'parameters')::json->>'builtdate'::text;
v_nodetype_id := ((p_data ->>'data')::json->>'parameters')::json->>'nodeType'::text;
v_nodecat_id := ((p_data ->>'data')::json->>'parameters')::json->>'nodeCat'::text;
v_selection_mode := (p_data ->>'data')::json->>'selectionMode'::text;
v_id := (p_data ->>'feature')::json->>'id'::text;



select replace(replace(replace(v_id, '[', ''), ']', ''), '"', '''') into v_id;

if v_selection_mode = 'previousSelection' then

v_querytext = ' AND arc_id in ('||v_id||')';

else

v_querytext = '';

end if;


select state into v_state from value_state_type where id=v_state_type;

Expand Down

0 comments on commit 1144b62

Please sign in to comment.