Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Good day I am developing on demand apps. I have used the binding script below in my Template/Detailed app. My problem is that there are certain field names with spaces for example the field "Client ID " in the script below. When I try run the app I get "Unexpected token error". THE script works fine when I use other field names with no spaces.Unfortunately I cannot change this field name because it is linked to other systems and it would require those systems to be changed too. Could anyone please assist.
//Creates a WHERE statement which can be used in table loads to restrict the data to a smaller set
SUB ExtendWhere(Name, ValVarName)
LET T = Name & '_COLNAME';
LET ColName = $(T);
LET Values = $(ValVarName);
IF len(Values) > 0 THEN
IF len(WHERE_PART) > 0 THEN //If WHERE clause exists then extend it with further values
LET WHERE_PART = '$(WHERE_PART) AND MATCH($(ColName),$(Values))';
ELSE
LET WHERE_PART = ' WHERE MATCH($(ColName),$(Values))'; //If WHERE clause does not exist then create it
ENDIF
ENDIF
END SUB;
//Here we set the variables ready to hold the names of any fields we want considering for ODAG filtering (selection)
SET Sel_Implementation = ; //resets the variable from any previous reload
SET Sel_Implementation = $(od_Implementation); // follow 'ods_' with the field name as it appears in your UI / final load
SET Sel_Implementation_COLNAME ='Implementation'; // enter the field name as it appears in the source data
SET Sel_Client ID= ;
SET Sel_Client ID= $(od_Client ID);
SET Sel_Client ID_COLNAME =Client ID;
SET WHERE_PART = '';
//This section builds the WHERE_PART variables that are passed to the SUB
//It extracts the values that have been selected from each field
FOR EACH fldname IN 'Sel_Implementation', 'Sel_Client ID'
LET vallist = $(fldname);
WHEN (IsNull(vallist)) LET vallist = '';
IF len(vallist) > 0 THEN
CALL ExtendWhere('$(fldname)','$(vallist)');
ENDIF
NEXT fldname
//Evaluate the WHERE_PART variable in the script for debugging
TRACE Generated WHERE clause: ;
TRACE $(WHERE_PART);
See the following post for solution:
Regards,
Brett
I have reached out to product management to see if they can have a look at this post, not sure how long it may take them to get to it though. I checked defect system, but I could not really find anything that fit, so we will have to wait to see if the PM knows something on this.
Regards,
Brett
See the following post for solution:
Regards,
Brett