     }
 
     func sortrundate() {
+        if self.sortedascendigdesending == true {
+            self.sortedascendigdesending = false
+        } else {
+            self.sortedascendigdesending = true
+        }
         let dateformatter = Tools().setDateformat()
         guard self.allconfigurationsasdictionary != nil else { return }
         let sorted = self.allconfigurationsasdictionary!.sorted { (dict1, dict2) -> Bool in
             if (dateformatter.date(from: (dict1.value(forKey: "runDateCellID") as? String) ?? ""))!.timeIntervalSince(dateformatter.date(from: (dict2.value(forKey: "runDateCellID") as? String) ?? "")!) > 0 {
-                return true
+                return self.sortedascendigdesending
             } else {
-                return false
+                return !self.sortedascendigdesending
             }
         }
         self.allconfigurationsasdictionary = sorted

    private var allconfigurations: [Configuration]?
    var allconfigurationsasdictionary: [NSDictionary]?
    private var allprofiles: [String]?

    private func getprofiles() {
        let profile = Files(root: .profileRoot)

        }
        self.allconfigurationsasdictionary = sorted
    }
    
    // Function for filter
    func filter(search: String?, column: Int) {
        guard search != nil || self.allconfigurationsasdictionary != nil else { return }
        globalDefaultQueue.async(execute: {() -> Void in
            switch column {
            case 0:
                let filtereddata = self.allconfigurationsasdictionary?.filter({
                    ($0.value(forKey: "localCatalogCellID") as? String)!.contains(search!)
                })
            default:
                return
            }
        })
    }

    init() {
        self.getprofiles()
