Hi All, I created a query rule and executing it. Some times it is wor

Hi All,

I created a query rule and executing it. Some times it is working fine but some times the same query is not working and giving the below error (please refer the attachment)

Thanks in advance....

OriginalPostID-103665

OriginalPostID-103665

  Discussion posts and replies are publicly visible

  • This may be a case of data duplicacy. Can you check in which exact case are you facing this issue. And then check DB for teh same.
  • Hi Pradeep, Thanks for your reply.

    I think I have not explained my problem properly. Here it is elaborately:

    1) I have created CDT named "TrialTable" using an XSD.
    2) Imported the same to Appian, added it to data store and published it successfully.
    3) Inserted data in to the table from MySql.
    4) Created a query rule "trialRule"
    As I mentioned earlier this query rule fetching data and sometimes not.

    Could some one explain, what's going wrong?
  • 0
    Certified Senior Developer
    Hi

    As per the problem stated here and the image provided, it seems that you are fetching all the rows from the db in the rule 'Test Query'.
    I would suggest that you should take only the relevant data from the db by passing some inputs. This might narrow your problem.
    Also, what is the data which you are saving in column 4? because the error mentions some problem in the value in column 4. Try fetching the first 3 columns in one go and see whether it works fine or not and column 4 separately.

    Also, are you inserted data in to the table via Appian or by some other means.
    Please try inserting data by Appian 'Write to Data Store Entity' Smart Service. Check whether the data is successfully inserting in the DB or it gives some kind of error.

    Hope this helps
  • Hi Ayusha, Thank you very much for your time.
    As per your suggestions,
    1)
    I tried fetching only relevant data by passing inputs, then it is giving the below error.
    Tried fetching first 3 columns separately, one go and 4 column separately. Even I deleted 4 column and tried these scenarios. Result is same.
    -------Error---------
    "There was an error testing the rule:

    Expression evaluation error in rule 'trialrule' at function 'queryruleexec': Error evaluating function 'queryruleexec' : Unexpected error executing query (type: [TrialTableDT628], query: [trialRule], order by: [[]], filters:[[]])"
    ------------------
    2) Also I am able to insert the data into table using "Write to Data Store Entity" smart service. No error.

  • And now I am not getting any error, but it is just fetching columns with empty values, as shown in fig.
    But table is having 3 rows of data. Why it is just fetching empty columns?