Examples: query, "exact match", wildcard*, wild?ard, wild*rd
Fuzzy search: cake~ (finds cakes, bake)
Term boost: "red velvet"^4, chocolate^2
Field grouping: tags:(+work -"fun-stuff")
Escape special characters +-&|!(){}[]^"~*?:\ - e.g. \+ \* \!
Range search: properties.timestamp:[1587729413488 TO *] (inclusive), properties.title:{A TO Z}(excluding A and Z)
Combinations: chocolate AND vanilla, chocolate OR vanilla, (chocolate OR vanilla) NOT "vanilla pudding"
Field search: properties.title:"The Title" AND text
 
← Back to post

Revisions 2

Using build_base_query within Extension for Symitar Core
Using build_base_query within Extension for Symitar Core
Hi Khalil, It sounds like you have a good grasp of what to do, already. You are correct, you do need the repgen name and the procedure. In order to do good testing in dev, you probably also want to build and pass a mock string to the function as well so that you can handle a complete flow, even in development. If your repgen takes other parameters, you can pass those as well. Here is an example of a what a more complete call might look like: ```python mock_str = "RSRG~2f5342b6-c5f7-4160-s49d-8431k9c7d8f1~K0~JRGLINE=DATAFILENAME=CORE.OVERDRFT.STAT.xxxxxxxxxx~JRGDATATYPE=9 <OVRDRFTCHANGE> <ID>01</ID> <SUCCESS>TRUE</SUCCESS> <STATUS>EXTENDED</STATUS> </OVRDRFTCHANGE>" status_str = "EXT" # Set up input values for UPDTESTA query to core rg_params = { 'RGUSERNUM1': "01", 'RGUSERCHR1': status_str, 'RGUSERCHR2': self.online_user.first_name, 'RGUSERCHR3': self.online_user.last_name } # Generate UPDATESTATUS query to the core query = await self.core.build_base_query( "CORE.OVERDRFT.STAT", "UPDTESTA", member_number=self.online_user.user_primary_cif, rg_params=rg_params, mock_response_string=mock_response ) # Call UPDTESTA query status_change_resp = await query.execute() # Do something more relevant than this with response based on your use case self.log(f"Core response: {status_change_resp.raw}") ``` Definitely also check out the docs and source for the function (which it sounds like you may already have!): [Function doc](https://docs.q2developer.com/api_references/q2_cores/Symitar/index.html#q2_cores.Symitar.core.Core.build_base_query) [Source](https://docs.q2developer.com/_modules/q2_cores/Symitar/core.html#Core) I hope that helps, Dan
Hi Khalil, It sounds like you have a good grasp of what to do, already. You are correct, you do need the repgen name and the procedure. In order to do good testing in dev, you probably also want to build and pass a mock string to the function as well so that you can handle a complete flow, even in development. If your repgen takes other parameters, you can pass those as well. Here is an example of a what a more complete call might look like: ```python mock_str = """RSRG~2f5342b6-c5f7-4160-s49d-8431k9c7d8f1~K0~JRGLINE=DATAFILENAME=CORE.OVERDRFT.STAT.xxxxxxxxxx~JRGDATATYPE=9 <OVRDRFTCHANGE> <ID>01</ID> <SUCCESS>TRUE</SUCCESS> <STATUS>EXTENDED</STATUS> </OVRDRFTCHANGE>""" status_str = "EXT" # Set up input values for UPDTESTA query to core rg_params = { 'RGUSERNUM1': "01", 'RGUSERCHR1': status_str, 'RGUSERCHR2': self.online_user.first_name, 'RGUSERCHR3': self.online_user.last_name } # Generate UPDATESTATUS query to the core query = await self.core.build_base_query( "CORE.OVERDRFT.STAT", "UPDTESTA", member_number=self.online_user.user_primary_cif, rg_params=rg_params, mock_response_string=mock_response ) # Call UPDTESTA query status_change_resp = await query.execute() # Do something more relevant than this with response based on your use case self.log(f"Core response: {status_change_resp.raw}") ``` Definitely also check out the docs and source for the function (which it sounds like you may already have!): [Function doc](https://docs.q2developer.com/api_references/q2_cores/Symitar/index.html#q2_cores.Symitar.core.Core.build_base_query) [Source](https://docs.q2developer.com/_modules/q2_cores/Symitar/core.html#Core) I hope that helps, Dan
4 years ago
Using build_base_query within Extension for Symitar Core

Hi Khalil, It sounds like you have a good grasp of what to do, already. You are correct, you do need the repgen name and the procedure. In order to do good testing in dev, you probably also want to build and pass a mock string to the function as well so that you can handle a complete flow, even in development. If your repgen takes other parameters, you can pass those as well. Here is an example of a what a more complete call might look like: ```python mock_str = """RSRG~2f5342b6-c5f7-4160-s49d-8431k9c7d8f1~K0~JRGLINE=DATAFILENAME=CORE.OVERDRFT.STAT.xxxxxxxxxx~JRGDATATYPE=9 <OVRDRFTCHANGE> <ID>01</ID> <SUCCESS>TRUE</SUCCESS> <STATUS>EXTENDED</STATUS> </OVRDRFTCHANGE>""" status_str = "EXT" # Set up input values for UPDTESTA query to core rg_params = { 'RGUSERNUM1': "01", 'RGUSERCHR1': status_str, 'RGUSERCHR2': self.online_user.first_name, 'RGUSERCHR3': self.online_user.last_name } # Generate UPDATESTATUS query to the core query = await self.core.build_base_query( "CORE.OVERDRFT.STAT", "UPDTESTA", member_number=self.online_user.user_primary_cif, rg_params=rg_params, mock_response_string=mock_response ) # Call UPDTESTA query status_change_resp = await query.execute() # Do something more relevant than this with response based on your use case self.log(f"Core response: {status_change_resp.raw}") ``` Definitely also check out the docs and source for the function (which it sounds like you may already have!): [Function doc](https://docs.q2developer.com/api_references/q2_cores/Symitar/index.html#q2_cores.Symitar.core.Core.build_base_query) [Source](https://docs.q2developer.com/_modules/q2_cores/Symitar/core.html#Core) I hope that helps, Dan