Skip to main content

Search

Search

Sort/Order after Data Entry

Comments

7 comments

  • Avatar
    Peter Thane

    Have you tried using the Sort Order option in the Database Connection Setup?

    0
  • Avatar
    David Cornette

    Thanks for the reply. I do sort based on the SQL Querry. The point is however that the data on what i want to sort has to be changed by data entry. The Data is also not saved in the ODBC Source so its a temprary fictional column.

    So i sort on the tempcolumn that i added to the table but it only sorts before data entry. I want the data to be sorted after data entry based on the values entered by the user. So a solution could be to have the data entry happen during the query for each record found but so far i only found a way to change the data after the query when all records have been found with data entry for each record.

     

    0
  • Avatar
    Peter Thane

    I am not sure that is possible directly within BarTender but you could use the Actions button to achieve this I expect. 

    You would need to create a new label (that doesn't print) but instead is linked to your database and includes all the data entry bits you need and database lookup to pull the required data. This then is output as a CSV file (that is linked to a modified version of your original label). After Data Entry the Action button opens this modified label, which can now include a sort on the new "temporary column" and prints it using the CSV file in the background. 

    Not the same but this may help as a guide on how to achieve the Action button side of it

    https://support.seagullscientific.com/hc/en-us/community/posts/360043921434-Need-Help-Properly-Parsing-Input-Data

    0
  • Avatar
    David Cornette

    Hey Pete

    Thanks again for the reply. I see what you are trying to do here. I don't have automation however so actions isn't really an option if i don't upgrade.

    In the case we would upgrade to automations however i still have some issues:
    The Action seems to be executed for each time the order entry form gets loaded (each record found in this case ? ).
    Can i write the whole recordset as one into the text file or append every record to a file and then find a way to delete it after each print job.

    Recap:

    I use this example query to get a few records selected: SELECT `Omschrijving`, `Aantal`, `LijnNummer`, `Artikel Nummer`, 1 as `ColliNr` FROM `Excel`.`Sheet1` ORDER BY ColliNr (it will be from an ODBC).

    I then have a data entry form that repeats for each record found by the above SQL Query to replace the "1 as `ColliNr`" to the desired collinumber for each record. 

    The labels print with the changed data from data entry but they should be sorted again before printing on the ColliNr field. Exporting the recordset with changed dataentry is a possibility but i don't see how to reference the enitre dataset at once.

     

     

    0
  • Avatar
    Peter Thane

    Not sure off hand, will mock something up and see

    0
  • Avatar
    David Cornette

    Currently "fixed" by having the datainput into an excel before printing the labels.
    The colli number data into an excel and then joining that excel to the odbc recordset. (Linking Linenumber to the odbc linenumber). The data then is sorted the conventional way on record select and can go straith to printing after entering the recordnumber to narrow the odbc query without additional data input.

    It's just a shame that i can't enter the data in the original dataset (ERP) and have an additional document next to bartender. Would prefer to have the input during or before recordselect or another sort action after recordselect.

    0
  • Avatar
    Peter Thane

    I cant get it to do what I wanted to anyway using the actions button. I can think of a way how you could do it using Integration Builder (but again Automation needed). It would be quite convoluted though (printing to file whilst text logging "printed" data, triggering on the 1st file and use the second as the database with a sort in there and then deleting both files). If you have got it working by a different route anyway then maybe better to stick with that.

    0

Please sign in to leave a comment.